[KYUUBI-7556] Fix engine deregistration watcher not rearmed after ZK reconnect - #7703
Closed
zhang-arvin wants to merge 1 commit into
Closed
Conversation
|
Hello @zhang-arvin, |
Contributor
|
This issue is already being addressed by #7558, which was opened by the issue reporter and is under review. Please check for existing PRs before claiming an issue or opening a competing patch. If you have suggestions, please contribute them to the existing PR instead. Closing this as a duplicate of #7558. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Fix the issue where Kyuubi engine's deregistration watcher is not re-registered after ZooKeeper session expires and reconnects.
When a ZooKeeper session expires, all watches are cleared because they are tied to the session. The
PersistentNodehandles recreating the ephemeral node when the connection is re-established, but the explicitDeRegisterWatcherset viawatchNode()was never re-armed. This means if the engine later crashes, its ZK node won't be properly cleaned up because the watcher is gone.Why are the changes needed?
Without this fix, after a ZK session expiry and reconnect, the engine's deregistration watcher is lost. If the engine subsequently crashes, the ZK ephemeral node won't be cleaned up, causing stale entries in the ZooKeeper namespace.
How was this patch tested?
ZookeeperDiscoveryClientSuiteWas this patch authored or co-authored using generative AI tooling?
No
Closes #7556