This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 9bc9685816c Load: Fix the warning of deleting a directory that already
deleted (#11902)
9bc9685816c is described below
commit 9bc9685816c45aa33a028cbcef5d26bf9e9ce19b
Author: Itami Sho <[email protected]>
AuthorDate: Mon Jan 15 19:39:17 2024 +0800
Load: Fix the warning of deleting a directory that already deleted (#11902)
---
.../iotdb/db/queryengine/execution/load/LoadTsFileManager.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/LoadTsFileManager.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/LoadTsFileManager.java
index 17907fd47f8..131e8f1884b 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/LoadTsFileManager.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/load/LoadTsFileManager.java
@@ -168,12 +168,12 @@ public class LoadTsFileManager {
return;
}
try {
- Files.delete(loadDirPath);
+ Files.deleteIfExists(loadDirPath);
LOGGER.info("Load dir {} was deleted.", loadDirPath);
} catch (DirectoryNotEmptyException e) {
LOGGER.info("Load dir {} is not empty, skip deleting.", loadDirPath);
} catch (IOException e) {
- LOGGER.warn(MESSAGE_DELETE_FAIL, loadDirPath, e);
+ LOGGER.info(MESSAGE_DELETE_FAIL, loadDirPath);
}
}
@@ -187,12 +187,12 @@ public class LoadTsFileManager {
return;
}
try {
- Files.delete(loadDirPath);
+ Files.deleteIfExists(loadDirPath);
LOGGER.info("Load dir {} was deleted.", loadDirPath);
} catch (DirectoryNotEmptyException e) {
LOGGER.info("Load dir {} is not empty, skip deleting.", loadDirPath);
} catch (IOException e) {
- LOGGER.warn(MESSAGE_DELETE_FAIL, loadDirPath, e);
+ LOGGER.info(MESSAGE_DELETE_FAIL, loadDirPath);
}
}