Details
-
Bug
-
Resolution: Done
-
Critical
-
5.1.0.CR1
-
None
Description
When a node leaves, KeyGeneratorWorker can get in an infinite loop because the consistent hash doesn't return the leaver any more and KeyGeneratorWorker will never be able to generate the required number of keys.
KeyAffinityServiceImpl installs a listener for TopologyChangeEvents that is supposed to adjust the queues and prevent this problem. However, it doesn't work if KeyGeneratorWorker is already generating keys, because it needs to acquire the maxNumberInvariant write lock and KeyGeneratorWorker is never going to release the maxNumberInvariant read lock.
What's worse, because the listener is synchronous, it also blocks the cache view installation and other cluster changes will be ignored.