You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "kaijchen (via GitHub)" <gi...@apache.org> on 2023/02/02 06:41:49 UTC

[GitHub] [incubator-uniffle] kaijchen commented on a diff in pull request #538: [Minor] Optimize ShuffleServerInfo#hashCode

kaijchen commented on code in PR #538:
URL: https://github.com/apache/incubator-uniffle/pull/538#discussion_r1094103312


##########
common/src/main/java/org/apache/uniffle/common/ShuffleServerInfo.java:
##########
@@ -54,7 +54,7 @@ public int getPort() {
 
   @Override
   public int hashCode() {
-    return host.hashCode();
+    return id.hashCode();

Review Comment:
   Why not include all three fields (`id`, `host`, `port`) in hashCode()?
   Such as `Objects.hash(id, host, port)`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org