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 2022/03/02 12:05:02 UTC

[GitHub] [iotdb] qiaojialin commented on a change in pull request #5156: [To rel/0.12][IOTDB-2642] Fix the new file has a higher compact priority than the old file in unseq compaction

qiaojialin commented on a change in pull request #5156:
URL: https://github.com/apache/iotdb/pull/5156#discussion_r817627203



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -769,8 +770,22 @@ private void recoverTsFiles(List<TsFileResource> tsFiles, boolean isSeq) throws
           tsFileProcessor.getTsFileProcessorInfo().addTSPMemCost(chunkMetadataSize);
         }
       }
-      tsFileManagement.add(tsFileResource, isSeq);
-    }
+      resourcesToBeInserted.add(tsFileResource);
+    }
+    resourcesToBeInserted.sort(

Review comment:
       why not just traversing the resourcesToBeInserted in descending order?




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