You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2024/06/11 12:50:56 UTC
(iotdb) branch load-multi-dir-fix created (now 87f616cdc6c)
This is an automated email from the ASF dual-hosted git repository.
rong pushed a change to branch load-multi-dir-fix
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 87f616cdc6c Load: Update loadTsFileDirs after all newLoadTsFileDirs are generated to avoid undefined behavior
This branch includes the following new commits:
new 87f616cdc6c Load: Update loadTsFileDirs after all newLoadTsFileDirs are generated to avoid undefined behavior
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iotdb) 01/01: Load: Update loadTsFileDirs after all newLoadTsFileDirs are generated to avoid undefined behavior
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch load-multi-dir-fix
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 87f616cdc6cdfc1a9bc99afe66c35ab85ed34571
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Tue Jun 11 20:50:47 2024 +0800
Load: Update loadTsFileDirs after all newLoadTsFileDirs are generated to avoid undefined behavior
---
.../src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index de2ba36464b..ea42d9f4d73 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -1467,11 +1467,16 @@ public class IoTDBConfig {
}
public void formulateLoadTsFileDirs(String[][] tierDataDirs) {
- loadTsFileDirs = new String[tierDataDirs.length];
+ final String[] newLoadTsFileDirs = new String[tierDataDirs.length];
for (int i = 0; i < tierDataDirs.length; i++) {
- loadTsFileDirs[i] =
+ newLoadTsFileDirs[i] =
tierDataDirs[i][0] + File.separator + IoTDBConstant.LOAD_TSFILE_FOLDER_NAME;
}
+
+ // Update loadTsFileDirs after all newLoadTsFileDirs are generated,
+ // or the newLoadTsFileDirs will be used in the middle of the process
+ // and cause the undefined behavior.
+ this.loadTsFileDirs = newLoadTsFileDirs;
}
public String getSchemaDir() {