qqu0127 commented on PR #2478: URL: https://github.com/apache/helix/pull/2478#issuecomment-1536669594
@jiajunwang > So I'm actually more concerned of adding hashCode which makes 2 different replica object identical. Adding hashCode won't make them identical, (well, in fact it's happening because `equals()`), having same hashCode doesn't necessarily mean the two objects are same, but two equaled objects must have same hash. Adding hashCode isn't making it worse or better, but make it consistent. Also FYI, `equals()` is used in https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/AssignableNode.java#L149 So, I'd prefer keeping `equals()` and adding `hashCode()` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
