ch-preference-list-skips-duplicates

Status: IN

`get_nodes` walks clockwise past virtual nodes belonging to already-seen physical nodes, ensuring exactly `replication_factor` distinct physical nodes in the preference list

Source: entries/2026/05/29/consistent-hashing-consistent_hashing.md

Example

seen = set()
result = []
while len(result) < self.replication_factor:
    node = self._ring_nodes[idx % n]
    if node not in seen:
        seen.add(node)
        result.append(node)
    idx += 1

JSON