CURATOR-724. Fix LeaderLatch recover on reconnected and missing leaderPath#515
CURATOR-724. Fix LeaderLatch recover on reconnected and missing leaderPath#515tisonkun merged 3 commits intoapache:masterfrom
Conversation
…rPath Signed-off-by: tison <wander4096@gmail.com>
kezhuw
left a comment
There was a problem hiding this comment.
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.
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.
Yeah. Updated add a test.
There was a problem hiding this comment.
Also ensure that the test failed without this fix.
| if (debugHandleReconnectedLatch != null) { | ||
| debugHandleReconnectedLatch.await(); | ||
| } | ||
| getChildren(); |
There was a problem hiding this comment.
Also it doesn't hurt we always call getChildren to check our leadership. It's not reset now anyway.
Signed-off-by: tison <wander4096@gmail.com>
|
When will a new tag be released? |
|
@xiaowuyy here is a release candidate for testing out - https://lists.apache.org/thread/5bnym8sycmmnmsz1ggq0cy1jjrrjqyoy If it looks good, I'll call the release in the next week. |
No description provided.