Skip to content

Conversation

@lbajolet-shopify
Copy link

The CreateProtectedEphemeralSequentialCtx function abstracts away the complexity to create a shared lock in a secure way. It creates the ephemeral node with a unique GUID prefix, and a monotonic counter because of it being sequential.

However, if Zookeeper has a problem (connection loss for example) at the exact right/wrong time, the node could be created on the server, and the confirmation may never be returned to the client, which may leave the ephemeral node if the session doesn't expire before the client reconnects.

To allow the client to rectify that problem, we return the prefixed path with the GUID, so it can delete it even if the function returns an error.

The CreateProtectedEphemeralSequentialCtx function abstracts away the
complexity to create a shared lock in a secure way. It creates the
ephemeral node with a unique GUID prefix, and a monotonic counter
because of it being sequential.

However, if Zookeeper has a problem (connection loss for example) at the
exact right/wrong time, the node could be created on the server, and the
confirmation may never be returned to the client, which may leave the
ephemeral node if the session doesn't expire before the client
reconnects.

To allow the client to rectify that problem, we return the prefixed path
with the GUID, so it can delete it even if the function returns an
error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant