This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a commit to branch compaction_recover_logger_1017
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/compaction_recover_logger_1017 
by this push:
     new c0c1a71bff6 fix the bug that source file may be inserted back to 
TsFileManager although it is not removed before
c0c1a71bff6 is described below

commit c0c1a71bff65ea89f01cf6bfc952135522633e54
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Wed Oct 18 15:57:51 2023 +0800

    fix the bug that source file may be inserted back to TsFileManager although 
it is not removed before
---
 .../dataregion/compaction/execute/task/AbstractCompactionTask.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java
index 3be3ee32fd7..d7d5c36687f 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java
@@ -248,7 +248,9 @@ public abstract class AbstractCompactionTask {
 
   protected void insertFilesToTsFileManager(List<TsFileResource> tsFiles) 
throws IOException {
     for (TsFileResource tsFileResource : tsFiles) {
-      tsFileManager.keepOrderInsert(tsFileResource, tsFileResource.isSeq());
+      if (!tsFileResource.isFileInList()) {
+        tsFileManager.keepOrderInsert(tsFileResource, tsFileResource.isSeq());
+      }
     }
   }
 

Reply via email to