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/01/12 04:18:47 UTC

[GitHub] [iotdb] wshao08 commented on a change in pull request #2445: Remove versionInfo in Tsfile and get rid of versions in memtable

wshao08 commented on a change in pull request #2445:
URL: https://github.com/apache/iotdb/pull/2445#discussion_r555504318



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/QueryUtils.java
##########
@@ -48,7 +48,7 @@ public static void modifyChunkMetaData(List<ChunkMetadata> chunkMetaData,
     for (int metaIndex = 0; metaIndex < chunkMetaData.size(); metaIndex++) {
       ChunkMetadata metaData = chunkMetaData.get(metaIndex);
       for (Modification modification : modifications) {
-        if (modification.getVersionNum() > metaData.getVersion()) {
+        if (modification.getFileOffset() > metaData.getOffsetOfChunkHeader()) {

Review comment:
       1. metaData.getOffsetOfChunkHeader() marks the byte offset of this chunk header.
   2. modification.getFileOffset() returns the offset of any chunk in the file after the chunk has been flushed. 
   So I consider it could be guaranteed that if any chunk is successfully flushed, offset in (2) > (1).
   Thats why I didn't add the equality condition.
   
   




----------------------------------------------------------------
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.

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