You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Ariel Weisberg <aw...@voltdb.com> on 2011/06/07 23:19:20 UTC

Session expiration mechanism

Hi,

I am working on a modified version of ZooKeeper, and I am having some
trouble understanding how session expiration is implemented.

It appears that once a create session requested is submitted it is
forwarded as a proposal to all followers. This means that the session
will be tracked by the SessionTracker at each member of the ensemble
(registration is done in FinalRequestProcessor), but as far as I can
tell the pings that would touch the session are only received by the
node where the session is currently active, and the leader which polls
the pings from all followers.

If that were true it seems like they would promptly time out at all
other nodes, and they would race to submit a request to close the
session.

Am I wrong about session information being tracked at all members of the
ensemble or am I wrong about the pings propagating only to the leader
and the directly connected node? Possibly something else?

Thanks,
Ariel Weisberg


Re: Session expiration mechanism

Posted by Ariel Weisberg <aw...@voltdb.com>.
Hi,

I see my mistake now. I thought createSessionTracker() from ZooKeeperServer
was being called at the followers. I completely missed
LearnerSessionTracker.

Thanks!
Ariel

On Tue, Jun 7, 2011 at 7:11 PM, Benjamin Reed <br...@apache.org> wrote:

> the leader tracks the session and tells the followers to close the
> session. the followers only summarize heartbeats for the leaders. we
> need to replicate the session open and closes so that they can be
> recovered if the leader dies.
>
> ben
>
> On Tue, Jun 7, 2011 at 2:19 PM, Ariel Weisberg <aw...@voltdb.com>
> wrote:
> > Hi,
> >
> > I am working on a modified version of ZooKeeper, and I am having some
> > trouble understanding how session expiration is implemented.
> >
> > It appears that once a create session requested is submitted it is
> > forwarded as a proposal to all followers. This means that the session
> > will be tracked by the SessionTracker at each member of the ensemble
> > (registration is done in FinalRequestProcessor), but as far as I can
> > tell the pings that would touch the session are only received by the
> > node where the session is currently active, and the leader which polls
> > the pings from all followers.
> >
> > If that were true it seems like they would promptly time out at all
> > other nodes, and they would race to submit a request to close the
> > session.
> >
> > Am I wrong about session information being tracked at all members of the
> > ensemble or am I wrong about the pings propagating only to the leader
> > and the directly connected node? Possibly something else?
> >
> > Thanks,
> > Ariel Weisberg
> >
> >
>

Re: Session expiration mechanism

Posted by Benjamin Reed <br...@apache.org>.
the leader tracks the session and tells the followers to close the
session. the followers only summarize heartbeats for the leaders. we
need to replicate the session open and closes so that they can be
recovered if the leader dies.

ben

On Tue, Jun 7, 2011 at 2:19 PM, Ariel Weisberg <aw...@voltdb.com> wrote:
> Hi,
>
> I am working on a modified version of ZooKeeper, and I am having some
> trouble understanding how session expiration is implemented.
>
> It appears that once a create session requested is submitted it is
> forwarded as a proposal to all followers. This means that the session
> will be tracked by the SessionTracker at each member of the ensemble
> (registration is done in FinalRequestProcessor), but as far as I can
> tell the pings that would touch the session are only received by the
> node where the session is currently active, and the leader which polls
> the pings from all followers.
>
> If that were true it seems like they would promptly time out at all
> other nodes, and they would race to submit a request to close the
> session.
>
> Am I wrong about session information being tracked at all members of the
> ensemble or am I wrong about the pings propagating only to the leader
> and the directly connected node? Possibly something else?
>
> Thanks,
> Ariel Weisberg
>
>