1 Comment
User's avatar
⭠ Return to thread
Ashish Pratap Singh's avatar

Great observation! While hash collisions are rare, they can still happen. In this implementation, the sorted_keys structure may store the same hash value for different virtual nodes. Currently, collisions aren’t explicitly handled, but they can be resolved by storing pairs {hash_value, virtual_node_id} instead of just hash values. This way, when removing a server, we can accurately identify and delete the correct virtual node, even if multiple nodes share the same hash.

Expand full comment