You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "qqu0127 (via GitHub)" <gi...@apache.org> on 2023/05/05 02:21:46 UTC

[GitHub] [helix] qqu0127 commented on pull request #2478: Add hashCode() to AssignableReplica and fix logic in hash-based collection

qqu0127 commented on PR #2478:
URL: https://github.com/apache/helix/pull/2478#issuecomment-1535615755

   > Could you please elaborate why the Set does not work? We are using set because of we do observe the list operation can cause a huge delay in computation for other scenarios.
   > 
   > Unless we have a strong reason using List or clear drawback for Set, I prefer to keep the set.
   
   Please refer to https://stackoverflow.com/questions/2265503/why-do-i-need-to-override-the-equals-and-hashcode-methods-in-java, we are not using it right. Two "equaled" object will be hashed into different bucket (or with collision, same bucket). There is no point using set over list in our case if `hashCode` isn't overriden. 


-- 
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: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org