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/11/23 08:51:55 UTC

[GitHub] [iotdb] THUMarkLau commented on a change in pull request #4438: [IOTDB-2039][To rel/0.12] Fix data redundant after too many open files exception occurs during compaction

THUMarkLau commented on a change in pull request #4438:
URL: https://github.com/apache/iotdb/pull/4438#discussion_r754903963



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/compaction/level/LevelCompactionTsFileManagement.java
##########
@@ -882,28 +883,92 @@ private void restoreCompaction() {
     File logFile =
         FSFactoryProducer.getFSFactory()
             .getFile(storageGroupDir, storageGroupName + COMPACTION_LOG_NAME);
+    logger.info(
+        "{}-{} [Compaction][Restore] Start to restore compaction",
+        storageGroupName,
+        virtualStorageGroupId);
     try {
       if (logFile.exists()) {
         CompactionLogAnalyzer logAnalyzer = new CompactionLogAnalyzer(logFile);
         logAnalyzer.analyze();
-        String targetFilePath = logAnalyzer.getTargetFile();
-        List<String> sourceFileList = logAnalyzer.getSourceFiles();
-        boolean isSeq = logAnalyzer.isSeq();
-        for (String file : sourceFileList) {
-          TsFileResource fileResource = getTsFileResource(file, isSeq);
-          if (fileResource != null) {
-            fileResource.setMerging(false);
+        CompactionFileInfo targetFileInfo = logAnalyzer.getTargetFileInfo();
+        if (targetFileInfo == null) {
+          logger.info(

Review comment:
       resolve




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