ISPN-12350 Persistent UUIDs are only used for initial consistent hash #10167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.redhat.com/browse/ISPN-12350
We need to use the
PersistentUUID
while hashing the node's address. Initially, I was going to only pass the converting method fromPersistentUUIDManager
in allConsistentHashFactory
uses, but soon enough, I realized that was not a good approach.To propagate the
PersistentUUID
and be ready to use it during the hash, I created theMember
class and theSyncConsistentHash
. TheMember
only wraps the values together. TheSyncConsistentHash
keep theMember
objects, serializing and transferring as needed, and other operations it delegates to theDefaultConsistentHash
.In the
ConsistentHashFactory
, I kept the existing methods, and the new ones will delegate to the already existing ones.ClusterCacheStatus
is using the added methods.The
SyncConsistentHash
serializes theUUID
, so it may be that we have a larger serialized object here when compared withDefaultConsistentHash
. From theSyncConsistentHashFactoryTest
, we also can see that it may move more segments.I was definitely struggling with this one. So any review or inputs is really appreciated.