Re: ephemeral node after server bounce

2010-02-04 Thread Ted Dunning
Yes. Normal exists should be handled. What Yonik is worried about is abnormal situations. Unfortunately, after you remove the semi-orderly shutdowns, you are left with a lot of residual cases where the timeout is the most reliable metric that the node has failed. On Thu, Feb 4, 2010 at 3:04 PM,

Re: ephemeral node after server bounce

2010-02-04 Thread Patrick Hunt
Ah, excellent idea, won't always work but may help. I think in this case (ephemerals) all Yonik would need to do is close the session. That will remove all ephemerals. Patrick kishore g wrote: Worst case option would be to have jvm shutdownhooks http://stackoverflow.com/questions/40376/handle

Re: ephemeral node after server bounce

2010-02-04 Thread kishore g
Worst case option would be to have jvm shutdownhooks http://stackoverflow.com/questions/40376/handle-signals-in-the-java-virtual-machine You can delete the znodes on exit. More like deleteOnExit functionality of a File thanks, Kishore G On Thu, Feb 4, 2010 at 2:56 PM, Patrick Hunt wrote: > h

Re: ephemeral node after server bounce

2010-02-04 Thread Patrick Hunt
hah, you guys beat me to the punch. I think having some unique per client token might also work (see my resp). Perhaps this is the ip of the host or better (esp if multiple clients on a single host) would be some solr specific id that uniquely identifies each node. Patrick Benjamin Reed wrote

Re: ephemeral node after server bounce

2010-02-04 Thread Patrick Hunt
Yonik Seeley wrote: We have solr nodes create ephemeral znodes (name based on host and port). The ephemeral znode takes some time to remove of course, so what happens is that if I bounce a solr server (containing a zk client) the ephemeral node will still exist when the server comes back up. Si

Re: ephemeral node after server bounce

2010-02-04 Thread Benjamin Reed
i second ted's proposals! thanx ted. there is one other option. when you create the ZooKeeper object you can pass a session id and password. your bounced server can actually reattach to the session. (that is why we put that constructor in.) to use it you need to save the session id and passwor

Re: ephemeral node after server bounce

2010-02-04 Thread Ted Dunning
On Thu, Feb 4, 2010 at 2:20 PM, Yonik Seeley wrote: > There's no way to "hand over" responsibility for an ephemeral znode, right? > Right. > We have solr nodes create ephemeral znodes (name based on host and port). > The ephemeral znode takes some time to remove of course, so what > happens is