[ 
https://issues.apache.org/jira/browse/CURATOR-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13777706#comment-13777706
 ] 

Benjamin Jaton commented on CURATOR-57:
---------------------------------------

I think we could use ZooKeeper's transaction IDs:
"Every change to the ZooKeeper state receives a stamp in the form of a zxid 
(ZooKeeper Transaction Id). This exposes the total ordering of all changes to 
ZooKeeper. Each change will have a unique zxid and if zxid1 is smaller than 
zxid2 then zxid1 happened before zxid2."

In the case of an event, we could use the czxid in the Stat object to have the 
order of creation of the children:
"czxid: The zxid of the change that caused this znode to be created."

Source:
http://zookeeper.apache.org/doc/r3.4.5/zookeeperProgrammers.html#sc_zkStatStructure
                
> Event order lost with PathChildrenCache
> ---------------------------------------
>
>                 Key: CURATOR-57
>                 URL: https://issues.apache.org/jira/browse/CURATOR-57
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.0.1-incubating
>         Environment: Ubuntu 10.10
>            Reporter: Benjamin Jaton
>             Fix For: awaiting-response
>
>         Attachments: Test.java
>
>
> I am attaching a simple test to demonstrate the problem:
> Single threaded 'for' loop that creates children 0 to N, the events are not 
> received in order.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to