XComp opened a new pull request, #21825:
URL: https://github.com/apache/flink/pull/21825

   1.17 "forwardport" PR for the 1.15 parent PR #19853
   
   Why do we need this?
   Refactoring the leader election for 
FLIP-285/[FLINK-26522](https://issues.apache.org/jira/browse/FLINK-26522) is 
kind of tricky. I'm trying to slice the code changes into meaningful commits 
(and ideally dedicated PRs) to make the review process easier.
   
   I ran into this issue when refactoring the code and merging classes into one 
which also required adapting tests. This revealed the inconsistency/bug in the 
ZooKeeperLeaderElectionDriver implementation. Merging the bugfixes into 1.17 
and 1.16 makes the other changes more reasonable/consistent.
   
   More specifically, this bug was revealed in 
ZooKeeperLeaderElectionTest.testLeaderShouldBeCorrectedWhenOverwritten when 
changing from the deprecated NodeCache to CuratorCache. The new 
CuratorCacheListener allows to be more selective on whether we expect a node 
creation or change which causes a test failure. The previous test 
implementation worked because we sent the 2nd write operation after writing the 
leaderinformation which caused a node-change event and, after all, made the 
test pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to