You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2024/03/27 09:50:51 UTC
(iotdb) branch ty/LoadCompactionBug created (now 18dc66e612c)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a change to branch ty/LoadCompactionBug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 18dc66e612c Fix potential concurrent bug between compaction and load
This branch includes the following new commits:
new 18dc66e612c Fix potential concurrent bug between compaction and load
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: Fix potential concurrent bug between compaction and load
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/LoadCompactionBug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 18dc66e612cc624da6d8037974449c65ea306c7a
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Mar 27 17:50:34 2024 +0800
Fix potential concurrent bug between compaction and load
---
.../iotdb/db/storageengine/dataregion/DataRegion.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
index 7b8aa508e21..f6da19fbb52 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
@@ -2630,13 +2630,6 @@ public class DataRegion implements IDataRegionForQuery {
false);
}
- // update partition version
- updatePartitionFileVersion(
- newTsFileResource.getTimePartition(), newTsFileResource.getVersion());
-
- // help tsfile resource degrade
- TsFileResourceManager.getInstance().registerSealedTsFileResource(newTsFileResource);
-
logger.info("TsFile {} is successfully loaded in unsequence list.", newFileName);
} catch (DiskSpaceInsufficientException e) {
logger.error(
@@ -2802,7 +2795,7 @@ public class DataRegion implements IDataRegionForQuery {
logger.error("The file {} has already been loaded in unsequence list", tsFileResource);
return false;
}
- tsFileManager.add(tsFileResource, false);
+
logger.info(
"Load tsfile in unsequence list, move file from {} to {}",
tsFileToLoad.getAbsolutePath(),
@@ -2887,6 +2880,11 @@ public class DataRegion implements IDataRegionForQuery {
}
}
+ // help tsfile resource degrade
+ TsFileResourceManager.getInstance().registerSealedTsFileResource(tsFileResource);
+
+ tsFileManager.add(tsFileResource, false);
+
updatePartitionFileVersion(filePartitionId, tsFileResource.getVersion());
return true;
}