ZOOKEEPER-4706: Support 64-bit sequential nodes using zxid #2059
+197
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is somewhat well-known that ZooKeeper's sequential node number will overflow finally. It is ok for most usages, but it could also be annoying to handle this overflow in client side in certain cases. It would be really nice for ZooKeeper to support 64-bit sequential number to avoid overflow for long running and high frequency usages.
This pr introduces new
CreateMode
s to not break existing usages and useszxid
as the sequence number to not change on-disk wire format.The consequence is that:
multi
with same prefix path. Butmulti
does not work well with same path modifications anyway. See ZOOKEEPER-4695.ZooKeeper docs about overflow
BookKeeper "depends on" this overflow
BookKeeper's LongZkLedgerIdGenerator will fallback to (or rollover) its long version in case of ephemeral sequence overflow.
Blockers
As I documented above, this pr does not work well with
multi
. I created ZOOKEEPER-4695 months ago in discussion of ZOOKEEPER-4655(#1950). If it is good for us to forbid multiple mutations of one key inmulti
, I think this pr is possibly promising as it breaks no implicit dependencies and requires no on-disk wire format change.