You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by lei liu <li...@gmail.com> on 2012/10/28 13:41:55 UTC

long time full gc

I have one application, that use zk client to create ephemeral znode, the
session timout is 30 seconds,  if the application encounter long time full
gc, example 60 seconds,  after full gc finish,  can the zk client
immediately receive session expried event or disconnected event?



Thanks,
LiuLei

Re: long time full gc

Posted by Ted Dunning <te...@gmail.com>.
It may take an arbitrary time to receive these events in general.

If they client is the only one with any disturbance and that disturbance is
exactly and only garbage collection, then what you say is true (that the
delay will be a few milliseconds or less).

On the other hand, if there are other disturbances such as VM disturbances,
it could be seconds.

On Sun, Oct 28, 2012 at 10:16 PM, lei liu <li...@gmail.com> wrote:

> After full gc finish, the client receive disconnected event, and reconnect
> server, after the reconnect is successful , the client receive the
> session expried event form server. So  I think that need to takes a few
> milliseconds to receive session expried events from full gc  finish, that's
> right?
>
>
> 2012/10/29 Ted Dunning <te...@gmail.com>
>
> > Yes.  When the GC finishes, it will get the disconnect and session
> > expiration event.
> >
> > You can experiment with what happens by using kill -STOP followed by kill
> > -CONT on a ZK client.
> >
> > On Sun, Oct 28, 2012 at 8:41 AM, lei liu <li...@gmail.com> wrote:
> >
> > > I have one application, that use zk client to create ephemeral znode,
> the
> > > session timout is 30 seconds,  if the application encounter long time
> > full
> > > gc, example 60 seconds,  after full gc finish,  can the zk client
> > > immediately receive session expried event or disconnected event?
> > >
> > >
> > >
> > > Thanks,
> > > LiuLei
> > >
> >
>

Re: long time full gc

Posted by Patrick Hunt <ph...@apache.org>.
That's true - the client needs to reconnect to the service (one of the
servers) in order to determine that the session is now expired. So at
a minimum it will take a few milliseconds.

Regards,

Patrick

On Sun, Oct 28, 2012 at 7:16 PM, lei liu <li...@gmail.com> wrote:
> After full gc finish, the client receive disconnected event, and reconnect
> server, after the reconnect is successful , the client receive the
> session expried event form server. So  I think that need to takes a few
> milliseconds to receive session expried events from full gc  finish, that's
> right?
>
>
> 2012/10/29 Ted Dunning <te...@gmail.com>
>
>> Yes.  When the GC finishes, it will get the disconnect and session
>> expiration event.
>>
>> You can experiment with what happens by using kill -STOP followed by kill
>> -CONT on a ZK client.
>>
>> On Sun, Oct 28, 2012 at 8:41 AM, lei liu <li...@gmail.com> wrote:
>>
>> > I have one application, that use zk client to create ephemeral znode, the
>> > session timout is 30 seconds,  if the application encounter long time
>> full
>> > gc, example 60 seconds,  after full gc finish,  can the zk client
>> > immediately receive session expried event or disconnected event?
>> >
>> >
>> >
>> > Thanks,
>> > LiuLei
>> >
>>

Re: long time full gc

Posted by lei liu <li...@gmail.com>.
After full gc finish, the client receive disconnected event, and reconnect
server, after the reconnect is successful , the client receive the
session expried event form server. So  I think that need to takes a few
milliseconds to receive session expried events from full gc  finish, that's
right?


2012/10/29 Ted Dunning <te...@gmail.com>

> Yes.  When the GC finishes, it will get the disconnect and session
> expiration event.
>
> You can experiment with what happens by using kill -STOP followed by kill
> -CONT on a ZK client.
>
> On Sun, Oct 28, 2012 at 8:41 AM, lei liu <li...@gmail.com> wrote:
>
> > I have one application, that use zk client to create ephemeral znode, the
> > session timout is 30 seconds,  if the application encounter long time
> full
> > gc, example 60 seconds,  after full gc finish,  can the zk client
> > immediately receive session expried event or disconnected event?
> >
> >
> >
> > Thanks,
> > LiuLei
> >
>

Re: long time full gc

Posted by Ted Dunning <te...@gmail.com>.
Yes.  When the GC finishes, it will get the disconnect and session
expiration event.

You can experiment with what happens by using kill -STOP followed by kill
-CONT on a ZK client.

On Sun, Oct 28, 2012 at 8:41 AM, lei liu <li...@gmail.com> wrote:

> I have one application, that use zk client to create ephemeral znode, the
> session timout is 30 seconds,  if the application encounter long time full
> gc, example 60 seconds,  after full gc finish,  can the zk client
> immediately receive session expried event or disconnected event?
>
>
>
> Thanks,
> LiuLei
>