Fix the race condition while Helix refresh cluster status cache. (#363)

* Fix the race condition while Helix refresh cluster status cache.

This change fix issue #331.
The design is ensuring one read only to avoid locking during the change notification. However, a later update introduced addition read. The result is that two reads may have different results because notification is lock free. This leads the cache to be in an inconsistent state. The impact is that the expected rebalance might not happen.
3 files changed
tree: 3803a2ffa3e4ea6ec90c761f5cf83198f0161695
  1. .gitignore
  2. .reviewboardrc
  3. LICENSE
  4. NOTICE
  5. README.md
  6. build
  7. bump-up.command
  8. deploySite.sh
  9. helix-admin-webapp/
  10. helix-agent/
  11. helix-core/
  12. helix-front/
  13. helix-rest/
  14. helix-style.xml
  15. hpost-review.sh
  16. pom.xml
  17. recipes/
  18. scripts/
  19. website/
README.md

Apache Helix

Helix is part of the Apache Software Foundation.

Project page: http://helix.apache.org/

Mailing list: http://helix.apache.org/mail-lists.html

Build

mvn clean install package -DskipTests

WHAT IS HELIX

Helix is a generic cluster management framework used for automatic management of partitioned, replicated and distributed resources hosted on a cluster of nodes. Helix provides the following features:

  1. Automatic assignment of resource/partition to nodes
  2. Node failure detection and recovery
  3. Dynamic addition of Resources
  4. Dynamic addition of nodes to the cluster
  5. Pluggable distributed state machine to manage the state of a resource via state transitions
  6. Automatic load balancing and throttling of transitions