-
Notifications
You must be signed in to change notification settings - Fork 243
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
In https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/AssignableReplica.java#L127, it overrides equals, but not hashCode. This is violating the Object.hashCode() contract and breaking lots of assumption, especially with hash-based collection.
What makes it even more awkward is the code building on top of this anti-pattern,
Line 450 in 0274d5a
| private static Map<String, Set<AssignableReplica>> getAllAssignableReplicas( |
Expected behavior
We should fix the hashCode and change to use List instead of Set to store values with duplication.
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working