Doing a simple create() method call in ZooKeeper seems to be incrementing by two instead of the normal one. While this is actually in keeping with the JavaDoc, which only specifies that the sequence be “monotonically increasing” without reference to the increment amount, I am not sure why this has started happening.
zk.create(path, value, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL);
I end up with “key-v-0000000056” then “key-v-0000000058″…where did 57 go?
Are you deleting key-v-0000000056 before you create the next key? The sequential id is just the cversion of the parent node, and deleting/creating children on the parent will increment the cversion.