I'm using Zookeeper (3.2.2) for a simple group membership service in
the manner that is typically described[1,2]:
I create a znode for the group, and each present group member adds an
ephemeral node under the group node. I'm using the cversion of the
group node as a "group number". I expected this value to be
monotonically increasing, but I'm seeing instances where this isn't
the case. According to the programmer's guide, changes to a node will
cause the appropriate version number to increase, but it says nothing
about decreasing.
Am I misunderstanding something about the way node version numbers
work? Is there a better/recommended way to implement a monotonically
increasing group number?
Thanks!
Kevin
[1] http://hadoop.apache.org/zookeeper/docs/r3.2.2/recipes.html
[2] http://eng.kaching.com/2010/01/actually-implementing-group-management.html