This is an automated email from the ASF dual-hosted git repository.
jt2594838 pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new 193271555b9 [To dev/1.3] Fixed the bug that the unclosed file may be
degraded when directly deleted (#17024) (#17660)
193271555b9 is described below
commit 193271555b9926a1ef0819cd56a6e9fa0066a5fd
Author: Caideyipi <[email protected]>
AuthorDate: Thu May 14 21:46:03 2026 +0800
[To dev/1.3] Fixed the bug that the unclosed file may be degraded when
directly deleted (#17024) (#17660)
---
.../iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 8571fd2e915..9f344c1994b 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
@@ -639,11 +639,13 @@ public class TsFileResource implements Cloneable {
* file physically.
*/
public boolean remove() {
- forceMarkDeleted();
// To release the memory occupied by pipe if held by it
// Note that pipe can safely handle the case that the time index does not
exist
isEmpty();
- degradeTimeIndex();
+ if (getStatus() != TsFileResourceStatus.UNCLOSED) {
+ degradeTimeIndex();
+ }
+ forceMarkDeleted();
try {
fsFactory.deleteIfExists(file);
fsFactory.deleteIfExists(