Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
In a multi-threaded environment, addNode() and removeNode() will have thread unsafe issues, divides the existing addNode and removeNode functions into smaller, synchronized operations: addVirtualNode() and removeVirtualNode(). In this way, addNode() and removeNode() also can be called in parallel. And add the ConsistentHash class Unit testing
What's changed?
In a multi-threaded environment,
addNode()
andremoveNode()
will have thread unsafe issues, divides the existing addNode and removeNode functions into smaller, synchronized operations:addVirtualNode()
andremoveVirtualNode()
. In this way,addNode()
andremoveNode()
also can be called in parallel. And add the ConsistentHash class Unit testingChecklist
Add or update API