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 21b0fb7cea3 Load: check if the DataRegion is Deleted before loading 
the new tsfile (#15346)
21b0fb7cea3 is described below

commit 21b0fb7cea31c7ef6ee12fb0d1f130b8b72e904e
Author: Itami Sho <[email protected]>
AuthorDate: Thu Apr 17 12:01:25 2025 +0800

    Load: check if the DataRegion is Deleted before loading the new tsfile 
(#15346)
---
 .../org/apache/iotdb/db/storageengine/dataregion/DataRegion.java    | 6 ++++++
 1 file changed, 6 insertions(+)

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 70d1c944237..6266a4d3129 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
@@ -3001,6 +3001,12 @@ public class DataRegion implements IDataRegionForQuery {
 
     writeLock("loadNewTsFile");
     try {
+      if (deleted) {
+        logger.info(
+            "Won't load TsFile {}, because region is deleted",
+            tsfileToBeInserted.getAbsolutePath());
+        return;
+      }
       newTsFileResource.setSeq(false);
       final String newFileName =
           getNewTsFileName(

Reply via email to