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/02/01 02:38:12 UTC

[GitHub] [iotdb] jt2594838 commented on a change in pull request #2605: Add level merge to "merge" command

jt2594838 commented on a change in pull request #2605:
URL: https://github.com/apache/iotdb/pull/2605#discussion_r567531707



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -1886,13 +1889,9 @@ private void loadUpgradedResources(List<TsFileResource> resources, boolean isseq
     resources.clear();
   }
 
-  public void merge(boolean fullMerge) {
-    writeLock();
-    try {
-      this.tsFileManagement.merge(fullMerge, tsFileManagement.getTsFileList(true),
-          tsFileManagement.getTsFileList(false), dataTTL);
-    } finally {
-      writeUnlock();
+  public void merge(boolean isFullMerge) {
+    for (long timePartitionId : timePartitionIdVersionControllerMap.keySet()) {
+      executeCompaction(timePartitionId, isFullMerge);
     }

Review comment:
       Now that the write lock is removed, is it possible that if more than one client issues concurrent merge requests, the result of ` tsFileManagement.forkCurrentFileList` and `tsFileManagement.setForceFullMerge` will be messed up, when the merge requests contain different arguments?




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