jt2594838 commented on code in PR #13878:
URL: https://github.com/apache/iotdb/pull/13878#discussion_r1845726415


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java:
##########
@@ -196,8 +197,27 @@ protected void 
setTargetFileForRecover(List<TsFileResource> resources) {
     }
   }
 
+  protected void prepareCompactionModFiles() throws IOException {
+    if (!TsFileResource.useSharedModFile) {
+      return;
+    }
+    TsFileResource firstSource = filesView.sourceFilesInLog.get(0);
+    TsFileResource firstTarget = filesView.targetFilesInPerformer.get(0);
+    ModFileManagement modFileManagement = firstSource.getModFileManagement();
+    ModificationFile modificationFile = 
modFileManagement.allocateFor(firstTarget);

Review Comment:
   Why should the recovery task locate the shared mod file during a roll-back?
   If you are concerned about the deletion of the shared mod file, then it is 
okay.
   Because after all TsFiles are recovered, all unreferenced shared mod files 
will be deleted (in another PR),
   and it is fine for the compaction recovery task to leave the shared mod 
files alone.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to