From e09546ec3507ca76f668664e5ac5d0c28490e398 Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Fri, 26 Jun 2026 18:25:23 +0800 Subject: [PATCH 1/6] Add copy fallback for compaction hard links --- ...RepairUnsortedFileCompactionPerformer.java | 9 ++++--- .../InsertionCrossSpaceCompactionTask.java | 14 +++++----- .../modification/ModificationFile.java | 3 ++- .../apache/iotdb/commons/utils/FileUtils.java | 27 +++++++++++++++++++ 4 files changed, 42 insertions(+), 11 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/RepairUnsortedFileCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/RepairUnsortedFileCompactionPerformer.java index 18e9ef24df2d8..534ea471ffa40 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/RepairUnsortedFileCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/RepairUnsortedFileCompactionPerformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.CompactionUtils; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.writer.AbstractCompactionWriter; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.writer.RepairUnsortedFileCompactionWriter; @@ -31,7 +32,6 @@ import java.io.File; import java.io.IOException; -import java.nio.file.Files; import java.util.Collections; import java.util.List; @@ -74,7 +74,7 @@ protected QueryDataSource initQueryDataSource() { private void prepareTargetFile() throws IOException { TsFileResource seqSourceFile = seqFiles.get(0); TsFileResource targetFile = targetFiles.get(0); - Files.createLink(targetFile.getTsFile().toPath(), seqSourceFile.getTsFile().toPath()); + FileUtils.createLink(targetFile.getTsFile().toPath(), seqSourceFile.getTsFile().toPath(), true); ITimeIndex timeIndex = seqSourceFile.getTimeIndex(); if (timeIndex instanceof DeviceTimeIndex) { targetFile.setTimeIndex(timeIndex); @@ -82,9 +82,10 @@ private void prepareTargetFile() throws IOException { targetFile.setTimeIndex(CompactionUtils.buildDeviceTimeIndex(seqSourceFile)); } if (seqSourceFile.modFileExists()) { - Files.createLink( + FileUtils.createLink( new File(seqSourceFile.getCompactionModFile().getFilePath()).toPath(), - new File(seqSourceFile.getModFile().getFilePath()).toPath()); + new File(seqSourceFile.getModFile().getFilePath()).toPath(), + true); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java index 992b5406708e8..e4440ac32f978 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.service.metrics.FileMetrics; import org.apache.iotdb.db.storageengine.dataregion.compaction.constant.CompactionTaskType; @@ -37,7 +38,6 @@ import java.io.File; import java.io.IOException; -import java.nio.file.Files; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -218,14 +218,16 @@ public File generateTargetFile() throws IOException { private void prepareTargetFiles() throws IOException { File sourceTsFile = unseqFileToInsert.getTsFile(); File targetTsFile = targetFile.getTsFile(); - Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); - Files.createLink( + FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); + FileUtils.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), + true); if (unseqFileToInsert.getModFile().exists()) { - Files.createLink( + FileUtils.createLink( new File(targetTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), + true); } targetFile.setProgressIndex(unseqFileToInsert.getMaxProgressIndex()); targetFile.deserialize(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java index 6489c7e52999f..bab214c5974dd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.modification; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.db.storageengine.dataregion.modification.io.LocalTextModificationAccessor; import org.apache.iotdb.db.storageengine.dataregion.modification.io.ModificationReader; import org.apache.iotdb.db.storageengine.dataregion.modification.io.ModificationWriter; @@ -180,7 +181,7 @@ public ModificationFile createHardlink() { File hardlink = new File(filePath + hardlinkSuffix); try { - Files.createLink(Paths.get(hardlink.getAbsolutePath()), Paths.get(filePath)); + FileUtils.createLink(Paths.get(hardlink.getAbsolutePath()), Paths.get(filePath), true); return new ModificationFile(hardlink.getAbsolutePath()); } catch (FileAlreadyExistsException e) { // retry a different name if the file is already created diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java index 557adf43f6274..ee5bff42ad6ca 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java @@ -70,6 +70,33 @@ public static boolean deleteFileIfExist(File file) { } } + public static void createLink(Path link, Path existing, boolean fallBackToCopy) + throws IOException { + try { + Files.createLink(link, existing); + } catch (IOException e) { + if (!fallBackToCopy) { + throw e; + } + try { + Files.copy(existing, link); + } catch (IOException copyException) { + copyException.addSuppressed(e); + throw copyException; + } + } catch (UnsupportedOperationException e) { + if (!fallBackToCopy) { + throw e; + } + try { + Files.copy(existing, link); + } catch (IOException copyException) { + copyException.addSuppressed(e); + throw copyException; + } + } + } + public static void deleteFileOrDirectory(File file) { deleteFileOrDirectory(file, false); } From 0c6aa7c65eb565feae888a11bd0fbe0426bfc5c9 Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Fri, 26 Jun 2026 18:30:01 +0800 Subject: [PATCH 2/6] Simplify create link fallback handling --- .../org/apache/iotdb/commons/utils/FileUtils.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java index ee5bff42ad6ca..01232f9237ab2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java @@ -74,17 +74,7 @@ public static void createLink(Path link, Path existing, boolean fallBackToCopy) throws IOException { try { Files.createLink(link, existing); - } catch (IOException e) { - if (!fallBackToCopy) { - throw e; - } - try { - Files.copy(existing, link); - } catch (IOException copyException) { - copyException.addSuppressed(e); - throw copyException; - } - } catch (UnsupportedOperationException e) { + } catch (IOException | UnsupportedOperationException e) { if (!fallBackToCopy) { throw e; } From 8ac47dc49b867466168350997ce7a1b93fe5161d Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Wed, 1 Jul 2026 16:40:58 +0800 Subject: [PATCH 3/6] Replace remaining compaction hard links with FileUtils --- .../task/InnerSpaceCompactionTask.java | 13 +++++--- .../RepairUnsortedFileCompactionTask.java | 7 ++-- ...ertionCrossSpaceCompactionRecoverTest.java | 33 +++++++++++-------- 3 files changed, 31 insertions(+), 22 deletions(-) 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 77627579252f3..434c42be5ce11 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 @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.DiskSpaceInsufficientException; @@ -443,14 +444,16 @@ protected void prepareTargetFiles() throws IOException { for (int i = 0; i < filesView.renamedTargetFiles.size(); i++) { TsFileResource oldFile = filesView.skippedSourceFiles.get(i); TsFileResource newFile = filesView.renamedTargetFiles.get(i); - Files.createLink(newFile.getTsFile().toPath(), oldFile.getTsFile().toPath()); - Files.createLink( + FileUtils.createLink(newFile.getTsFile().toPath(), oldFile.getTsFile().toPath(), true); + FileUtils.createLink( new File(newFile.getTsFilePath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(oldFile.getTsFilePath() + TsFileResource.RESOURCE_SUFFIX).toPath()); + new File(oldFile.getTsFilePath() + TsFileResource.RESOURCE_SUFFIX).toPath(), + true); if (oldFile.modFileExists()) { - Files.createLink( + FileUtils.createLink( new File(newFile.getTsFilePath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(oldFile.getTsFilePath() + ModificationFile.FILE_SUFFIX).toPath()); + new File(oldFile.getTsFilePath() + ModificationFile.FILE_SUFFIX).toPath(), + true); } newFile.deserialize(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java index f43bd7767b2c8..56915e364dc0f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.db.storageengine.dataregion.compaction.constant.CompactionTaskType; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl.RepairUnsortedFileCompactionPerformer; @@ -35,7 +36,6 @@ import java.io.File; import java.io.IOException; -import java.nio.file.Files; import java.util.Arrays; import java.util.Collections; import java.util.concurrent.CountDownLatch; @@ -169,9 +169,10 @@ protected void prepareTargetFiles() throws IOException { filesView.sourceFilesInCompactionPerformer, filesView.targetFilesInPerformer); } else { if (sourceFile.modFileExists()) { - Files.createLink( + FileUtils.createLink( new File(filesView.targetFilesInPerformer.get(0).getModFile().getFilePath()).toPath(), - new File(sourceFile.getModFile().getFilePath()).toPath()); + new File(sourceFile.getModFile().getFilePath()).toPath(), + true); } } } diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java index 40fdc2d5cd8c1..06566613b6c3e 100644 --- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java +++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.db.storageengine.dataregion.compaction.cross; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.commons.exception.IllegalPathException; import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.db.exception.MergeException; @@ -54,7 +55,6 @@ import java.io.File; import java.io.IOException; -import java.nio.file.Files; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -145,10 +145,11 @@ public void testRecoverWithTargetModFileNotExistedAndSourceModFileExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); - Files.createLink( + FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); + FileUtils.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), + true); } // recover compaction, all source file should exist and target file should be deleted @@ -231,14 +232,16 @@ public void testRecoverWithTargetModFileNotExistedAndSourceModNotExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); - Files.createLink( + FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); + FileUtils.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), + true); if (unseqResource1.getModFile().exists()) { - Files.createLink( + FileUtils.createLink( new File(targetTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), + true); } } @@ -325,14 +328,16 @@ public void testRecoverWithAllTargetFileExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); - Files.createLink( + FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); + FileUtils.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), + true); if (unseqResource1.getModFile().exists()) { - Files.createLink( + FileUtils.createLink( new File(targetTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath()); + new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), + true); } } From 27bf0c05a7b5ce7a50adb9740bf0b9001d2ae027 Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Wed, 1 Jul 2026 16:44:31 +0800 Subject: [PATCH 4/6] Keep compaction recovery tests using direct hard links --- ...ertionCrossSpaceCompactionRecoverTest.java | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java index 06566613b6c3e..40fdc2d5cd8c1 100644 --- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java +++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/cross/InsertionCrossSpaceCompactionRecoverTest.java @@ -18,7 +18,6 @@ */ package org.apache.iotdb.db.storageengine.dataregion.compaction.cross; -import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.commons.exception.IllegalPathException; import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.db.exception.MergeException; @@ -55,6 +54,7 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -145,11 +145,10 @@ public void testRecoverWithTargetModFileNotExistedAndSourceModFileExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); - FileUtils.createLink( + Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); + Files.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - true); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); } // recover compaction, all source file should exist and target file should be deleted @@ -232,16 +231,14 @@ public void testRecoverWithTargetModFileNotExistedAndSourceModNotExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); - FileUtils.createLink( + Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); + Files.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - true); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); if (unseqResource1.getModFile().exists()) { - FileUtils.createLink( + Files.createLink( new File(targetTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - true); + new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath()); } } @@ -328,16 +325,14 @@ public void testRecoverWithAllTargetFileExisted() File sourceTsFile = unseqResource1.getTsFile(); File targetTsFile = targetFile.getTsFile(); - FileUtils.createLink(targetTsFile.toPath(), sourceTsFile.toPath(), true); - FileUtils.createLink( + Files.createLink(targetTsFile.toPath(), sourceTsFile.toPath()); + Files.createLink( new File(targetTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath(), - true); + new File(sourceTsFile.getPath() + TsFileResource.RESOURCE_SUFFIX).toPath()); if (unseqResource1.getModFile().exists()) { - FileUtils.createLink( + Files.createLink( new File(targetTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath(), - true); + new File(sourceTsFile.getPath() + ModificationFile.FILE_SUFFIX).toPath()); } } From 5b4b89ab35060f515e066126fb2b2263826478a8 Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Wed, 1 Jul 2026 16:48:48 +0800 Subject: [PATCH 5/6] spotless --- .../execute/task/RepairUnsortedFileCompactionTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java index 56915e364dc0f..0cc773101d1e2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java @@ -19,8 +19,8 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task; -import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.commons.conf.IoTDBConstant; +import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.db.storageengine.dataregion.compaction.constant.CompactionTaskType; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl.RepairUnsortedFileCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.CompactionUtils; From 324345f06ec75e57f835d1d172d5b9706a4f28e8 Mon Sep 17 00:00:00 2001 From: shuwenwei Date: Wed, 1 Jul 2026 16:58:03 +0800 Subject: [PATCH 6/6] fix compilation error --- .../execute/task/InsertionCrossSpaceCompactionTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java index e4440ac32f978..8b242feb64929 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java @@ -38,6 +38,7 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; import java.util.ArrayList; import java.util.Collections; import java.util.List;