swuferhong commented on code in PR #2337:
URL: https://github.com/apache/fluss/pull/2337#discussion_r2680726145
##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/model/ServerModel.java:
##########
@@ -203,11 +204,13 @@ public boolean equals(Object o) {
return false;
}
ServerModel that = (ServerModel) o;
- return serverId == that.serverId;
+ return serverId == that.serverId
+ && isOfflineTagged == that.isOfflineTagged
Review Comment:
For the `equals()` method of `ServerModel`, we only need to ensure that the
`serverId` is the same. If any changes are needed, they should not be made in
this PR.
##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/model/ServerModel.java:
##########
@@ -203,11 +204,13 @@ public boolean equals(Object o) {
return false;
}
ServerModel that = (ServerModel) o;
- return serverId == that.serverId;
+ return serverId == that.serverId
+ && isOfflineTagged == that.isOfflineTagged
+ && Objects.equals(rack, that.rack);
}
@Override
public int hashCode() {
- return serverId;
+ return Objects.hash(serverId, isOfflineTagged, rack);
Review Comment:
ditto
--
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]