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/04 07:47:00 UTC

[GitHub] [iotdb] THUMarkLau commented on a change in pull request #5157: [IOTDB-2633]Unification of compaction log formats

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



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/compaction/cross/rewrite/task/RewriteCrossSpaceCompactionTask.java
##########
@@ -134,23 +131,20 @@ private void executeCompaction()
             selectedSeqTsFileResourceList.get(0).getTsFile().getParent()
                 + File.separator
                 + targetTsfileResourceList.get(0).getTsFile().getName()
-                + PATH_SEPARATOR
-                + RewriteCrossSpaceCompactionLogger.COMPACTION_LOG_NAME);
+                + CompactionLogger.CROSS_COMPACTION_LOG_NAME_SUFFIX);
 
-    try (RewriteCrossSpaceCompactionLogger compactionLogger =
-        new RewriteCrossSpaceCompactionLogger(logFile)) {
+    try (CompactionLogger compactionLogger = new CompactionLogger(logFile)) {
       // print the path of the temporary file first for priority check during recovery
+      compactionLogger.logFiles(selectedSeqTsFileResourceList, STR_SOURCE_FILES);
+      compactionLogger.logFiles(selectedUnSeqTsFileResourceList, STR_SOURCE_FILES);
       compactionLogger.logFiles(targetTsfileResourceList, STR_TARGET_FILES);
-      compactionLogger.logFiles(selectedSeqTsFileResourceList, STR_SEQ_FILES);
-      compactionLogger.logFiles(selectedUnSeqTsFileResourceList, STR_UNSEQ_FILES);
       CompactionUtils.compact(

Review comment:
       may be we can close the logger before `compact`?




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