-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURATOR-724. Fix LeaderLatch recover on reconnected and missing leaderPath #515
Conversation
…rPath Signed-off-by: tison <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I guess we could write a test for this.
// (2) Scale it back. | ||
// | ||
// See also https://issues.apache.org/jira/browse/CURATOR-724 | ||
reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, before #430, the leaderLatch calls reset method after reconnection, and reset will whatever create the missing parent path nodes. So I didn't find this issue in the old versions. -- CURATOR-724
Just for sure, so, in case of RECONNECTED
, we have no idea what happened to the cluster and getChildren
is a conservative option comparing to reset
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Updated add a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ensure that the test failed without this fix.
} | ||
getChildren(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it doesn't hurt we always call getChildren
to check our leadership. It's not reset now anyway.
Signed-off-by: tison <[email protected]>
Signed-off-by: tison <[email protected]>
No description provided.