You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kevin Burton <bu...@spinn3r.com> on 2009/01/07 02:03:38 UTC

event re-issue on reconnect?

I have an event watching a file... and if I restart the server I get this:

onConnect
onData path: /foo, version: 4, data: '2333'
onDisconnect
onConnect
onData path: /foo, version: 4, data: '2333'

It re-issues the same version of the file. I can of course watch for this in
my code but it seems like a bug.

Shouldn't the client keep track of the stat of watches and not bubble up the
same event on server reconnect?

Kevin

-- 
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com

Re: event re-issue on reconnect?

Posted by Kevin Burton <bu...@spinn3r.com>.
On Tue, Jan 6, 2009 at 7:09 PM, Mahadev Konar <ma...@yahoo-inc.com> wrote:

> Does onData mean a datawatch?
>

Sorry....I should have recorded the actual events.

It's a NodeCreated event being thrown when reconnecting....

this is the result of event.toString on the events as I see them.

WatchedEvent: Server state change. New state: Disconnected
WatchedEvent: Server state change. New state: SyncConnected
WatchedEvent: Znode change. Path: /foo Type: NodeCreated

Kevin

-- 
Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com

Re: event re-issue on reconnect?

Posted by Mahadev Konar <ma...@yahoo-inc.com>.
Does onData mean a datawatch?
onConnect
> onData path: /foo, version: 4, data: '2333'
> onDisconnect
> onConnect
> onData path: /foo, version: 4, data: '2333'


Are these the sequence of events that you get on the client?

mahadev


On 1/6/09 5:03 PM, "Kevin Burton" <bu...@spinn3r.com> wrote:

> I have an event watching a file... and if I restart the server I get this:
> 
> onConnect
> onData path: /foo, version: 4, data: '2333'
> onDisconnect
> onConnect
> onData path: /foo, version: 4, data: '2333'
> 
> It re-issues the same version of the file. I can of course watch for this in
> my code but it seems like a bug.
> 
> Shouldn't the client keep track of the stat of watches and not bubble up the
> same event on server reconnect?
> 
> Kevin