CURATOR-671: Make sure success LeaderSelector::requeue after observing hasLeadership and then !hasLeadership (#462)

`TestLeaderSelectorCluster.testLostRestart` depends on success
`LeaderSelector::requeue` after observing `hasLeadership` and then
`!hasLeadership`. #446(CURATOR-518) breaks this.

Instead of simply looping till success `LeaderSelector::requeue`, I
tend to revert to old behavior as it was that since its introduce in
eb4d2aaf7702e7e5ffbf1c1dd8544e88b1171045.

Though, we can't depend this in case of no leadership was ever granted.
In this case, when session expired, I guess looping on `requeue` may be
the only option. Anyway, `requeue` is somewhat hard to use correctly.
1 file changed
tree: 183786b73fdf712686eda896709a5b9c01603b97
  1. .github/
  2. .mvn/
  3. curator-client/
  4. curator-examples/
  5. curator-framework/
  6. curator-recipes/
  7. curator-test/
  8. curator-test-zk35/
  9. curator-test-zk36/
  10. curator-x-async/
  11. curator-x-discovery/
  12. curator-x-discovery-server/
  13. src/
  14. .asf.yaml
  15. .gitignore
  16. DEPENDENCIES
  17. doap.rdf
  18. LICENSE
  19. licenserc.toml
  20. merge-pr.py
  21. mvnw
  22. mvnw.cmd
  23. NOTICE
  24. pom.xml
  25. README.md
README.md

Apache Curator

Maven Central Curator Website Stack Overflow Twitter

What is Apache Curator?

Apache Curator is a Java/JVM client library for Apache ZooKeeper, a distributed coordination service.

Apache Curator includes a high-level API framework and utilities to make using Apache ZooKeeper much easier and more reliable. It also includes recipes for common use cases and extensions such as service discovery and a Java 8 asynchronous DSL.

For more details: