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

jiangtian pushed a commit to branch rc/1.3.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/1.3.3 by this push:
     new db531ffd602 fix bug (#13397)
db531ffd602 is described below

commit db531ffd602fed7ccb50df8b03afe019dc592635
Author: shuwenwei <[email protected]>
AuthorDate: Wed Sep 4 18:08:12 2024 +0800

    fix bug (#13397)
---
 .../dataregion/compaction/execute/task/InnerSpaceCompactionTask.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java
index 9649efbfea5..fd06a8a3816 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java
@@ -361,6 +361,7 @@ public class InnerSpaceCompactionTask extends 
AbstractCompactionTask {
     for (int i = 0; i < filesView.skippedSourceFiles.size(); i++) {
       TsFileResource resource = filesView.sortedAllSourceFilesInTask.get(i);
       File file = resource.getTsFile();
+      File skippedSourceFile = filesView.skippedSourceFiles.get(i).getTsFile();
       TsFileNameGenerator.TsFileName tsFileName = 
TsFileNameGenerator.getTsFileName(file.getName());
       String newFileName =
           String.format(
@@ -371,7 +372,7 @@ public class InnerSpaceCompactionTask extends 
AbstractCompactionTask {
               tsFileName.getCrossCompactionCnt() + 1);
       TsFileResource renamedTargetFile =
           new TsFileResource(
-              new File(file.getParentFile().getPath() + File.separator + 
newFileName),
+              new File(skippedSourceFile.getParentFile().getPath() + 
File.separator + newFileName),
               TsFileResourceStatus.COMPACTING);
       filesView.renamedTargetFiles.add(renamedTargetFile);
     }

Reply via email to