You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/27 09:35:13 UTC

[GitHub] [iotdb] liuminghui233 opened a new pull request #4044: [To rel/0.12] [IOTDB-1726] Wrong hashCode() and equals() method in ChunkMetadata

liuminghui233 opened a new pull request #4044:
URL: https://github.com/apache/iotdb/pull/4044


   We can see that chunkMetadata use version to differentiate, however, in different storage groups, different file's version may be same. That means root.sg1.d1.s1 and root.sg2.d1.s1 may share the same cache entry in ChunkCache.


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

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



[GitHub] [iotdb] wangchao316 commented on a change in pull request #4044: [To rel/0.12] [IOTDB-1726] Wrong hashCode() and equals() method in ChunkMetadata

Posted by GitBox <gi...@apache.org>.
wangchao316 commented on a change in pull request #4044:
URL: https://github.com/apache/iotdb/pull/4044#discussion_r717156857



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetadata.java
##########
@@ -224,16 +228,12 @@ public boolean equals(Object o) {
     ChunkMetadata that = (ChunkMetadata) o;
     return offsetOfChunkHeader == that.offsetOfChunkHeader
         && version == that.version
-        && Objects.equals(measurementUid, that.measurementUid)
-        && tsDataType == that.tsDataType
-        && Objects.equals(deleteIntervalList, that.deleteIntervalList)
-        && Objects.equals(statistics, that.statistics);
+        && partialFilePathForCache.equals(that.partialFilePathForCache);

Review comment:
       hi,  equals and hashcode can not only use for cache,  ChunkMetadata have other place for judgments. 
   test case have some fail.




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

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



[GitHub] [iotdb] JackieTien97 merged pull request #4044: [To rel/0.12] [IOTDB-1726] Wrong hashCode() and equals() method in ChunkMetadata

Posted by GitBox <gi...@apache.org>.
JackieTien97 merged pull request #4044:
URL: https://github.com/apache/iotdb/pull/4044


   


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

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



[GitHub] [iotdb] wangchao316 commented on a change in pull request #4044: [To rel/0.12] [IOTDB-1726] Wrong hashCode() and equals() method in ChunkMetadata

Posted by GitBox <gi...@apache.org>.
wangchao316 commented on a change in pull request #4044:
URL: https://github.com/apache/iotdb/pull/4044#discussion_r717156857



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetadata.java
##########
@@ -224,16 +228,12 @@ public boolean equals(Object o) {
     ChunkMetadata that = (ChunkMetadata) o;
     return offsetOfChunkHeader == that.offsetOfChunkHeader
         && version == that.version
-        && Objects.equals(measurementUid, that.measurementUid)
-        && tsDataType == that.tsDataType
-        && Objects.equals(deleteIntervalList, that.deleteIntervalList)
-        && Objects.equals(statistics, that.statistics);
+        && partialFilePathForCache.equals(that.partialFilePathForCache);

Review comment:
       hi,  equals and hashcode can not only use for cache,  ChunkMetadata have other place for judgments. 
   test case have some fail.




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

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