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 c911c406bd1 Pipe: Fixed FileNotFoundException caused by processing 
files deleted by compaction & Changed the "isEmpty()" judgement to avoid 
"getDevice()" attempts to read from a deleted file when using fileTimeIndex 
(#12405)
c911c406bd1 is described below

commit c911c406bd1ad3b98dac74e8ead94a275eb62018
Author: Caideyipi <[email protected]>
AuthorDate: Wed Apr 24 18:08:57 2024 +0800

    Pipe: Fixed FileNotFoundException caused by processing files deleted by 
compaction & Changed the "isEmpty()" judgement to avoid "getDevice()" attempts 
to read from a deleted file when using fileTimeIndex (#12405)
---
 .../apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
index e1be5e381aa..d23c64b84c0 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
@@ -1147,7 +1147,7 @@ public class TsFileResource {
   }
 
   public boolean isEmpty() {
-    return getDevices().isEmpty();
+    return getFileStartTime() == Long.MAX_VALUE && getFileEndTime() == 
Long.MIN_VALUE;
   }
 
   public String getDatabaseName() {

Reply via email to