OneSizeFitsQuorum commented on code in PR #8662:
URL: https://github.com/apache/iotdb/pull/8662#discussion_r1059828077


##########
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessorInfoMetrics.java:
##########
@@ -64,11 +65,12 @@ public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
     TsFileProcessorInfoMetrics that = (TsFileProcessorInfoMetrics) o;
-    return memCost == that.memCost && Objects.equals(storageGroupName, 
that.storageGroupName);
+    return Objects.equals(storageGroupName, that.storageGroupName)

Review Comment:
   Do we need to override the equal and hashcode of TsFileProcessorInfo?



##########
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessorInfoMetrics.java:
##########
@@ -64,11 +65,12 @@ public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
     TsFileProcessorInfoMetrics that = (TsFileProcessorInfoMetrics) o;
-    return memCost == that.memCost && Objects.equals(storageGroupName, 
that.storageGroupName);
+    return Objects.equals(storageGroupName, that.storageGroupName)
+        && Objects.equals(tsFileProcessorInfo, that.tsFileProcessorInfo);
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(storageGroupName, memCost);
+    return Objects.hash(storageGroupName, tsFileProcessorInfo);

Review Comment:
   same



-- 
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-unsubscr...@iotdb.apache.org

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

Reply via email to