You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iex> ring = HashRing.new()
|> HashRing.add_node(:a@localhost)
|> HashRing.add_node(:b@localhost)
#<Ring[:b@localhost, :a@localhost]>
Request to get a list of 2 nodes for the key 14:
iex> HashRing.key_to_nodes(ring, 14, 2)
Expected result is 2 nodes:
[:a@localhost, :b@localhost]
Actual result is one node:
[:a@localhost]
Forgive me if I'm misreading HashRing.key_to_nodes/3 but it sounds like if you ask for 2 nodes and your ring has 2 nodes, then the result should contain 2 nodes. If that's not the case, then the docs should be clarified. On the other hand, if this represents a bug in how certain nodes are calculated due to the names (?) of the nodes, then the fix is something more than just clarifying the docs.
Activity