zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Kelly <iv...@yahoo-inc.com>
Subject Re: Get sequence number without node creation
Date Fri, 18 Nov 2011 09:20:47 GMT
Hi Vitalii,

You could try create(EPHEMERAL | SEQUENTIAL) so that if you loss your session, the znode will
disappear.

-Ivan

On 17 Nov 2011, at 10:59, Vitalii Tymchyshyn wrote:

> Hello.
> 
> I have a feature request I'd like to discuss: How about a call that will 
> give next sequential node number without node creation. Main reason is 
> that in many cases this would allow retries without leak on reconnect, e.g.:
> Now:
> 1) create(SEQUENTIAL) - disconnect - retry - and you've just leaked a node
> Can be
> 2) incrementCounter() - create(name). And you can make a retry in any 
> place. The worst thing that can occur is that you will have a hole in 
> your numbering
> 
> Another cases this can help are simple counters (no need to create nodes 
> at all) or simply different sequential nodes naming schema.
> 
> Best regards, Vitalii Tymchyshyn


Mime
View raw message