Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-12350 Persistent UUIDs are only used for initial consistent hash #10167

Closed
wants to merge 1 commit into from

Conversation

jabolina
Copy link
Member

@jabolina jabolina commented Jun 9, 2022

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 from PersistentUUIDManager in all ConsistentHashFactory 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 the Member class and the SyncConsistentHash. The Member only wraps the values together. The SyncConsistentHash keep the Member objects, serializing and transferring as needed, and other operations it delegates to the DefaultConsistentHash.

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 the UUID, so it may be that we have a larger serialized object here when compared with DefaultConsistentHash. From the SyncConsistentHashFactoryTest, 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.

We need to use the `PersistentUUID` while hashing the node's address.
Initially, I was going to only pass the method from
`PersistentUUIDManager` in all methods in `ConsistentHashFactory`,
but soon enough I realized that was not a good approach.

To easily propagate the `PersistentUUID` between operations I created
the `Member` class to be used in the factories and the
`SyncConsistentHash` that hold the members but delegates most of the
functionalities to the `DefaultConsistentHash`.

In the factory I kept the existing methods and the new ones will
delegate to the existing. I've updated in the `ClusterCacheStatus` to
use the new methods.

* When the `SyncConsistentHash` is serialized the UUID are also included,
so the serialized hash can be larger when compared with the previous
version. From the `SyncConsistentHashFactoryTest` we also can see that
is possible that more segments are moved.
@jabolina
Copy link
Member Author

I believe we can close this for now. If necessary, we have the changes to resume working.

@jabolina jabolina closed this May 19, 2023
@jabolina jabolina deleted the ISPN-12350-sync-hash branch May 19, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant