This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch object_type
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/object_type by this push:
     new 53cdbb6c2a1 objectFileId recover
53cdbb6c2a1 is described below

commit 53cdbb6c2a1ec9581bcc589207632480145641b3
Author: HTHou <[email protected]>
AuthorDate: Mon Jul 7 10:46:11 2025 +0800

    objectFileId recover
---
 .../apache/iotdb/db/storageengine/dataregion/DataRegion.java  | 11 +++++++++++
 1 file changed, 11 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 4e248ed3e48..be2917ffd32 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
@@ -817,6 +817,17 @@ public class DataRegion implements IDataRegionForQuery {
               String tsFilePartitionPath = partitionName + File.separator + 
f.getName();
               tsFilePartitionPath2File.put(tsFilePartitionPath, f);
             }
+
+            File[] objectFileInThisFolder =
+                fsFactory.listFilesBySuffix(partitionFolder.getAbsolutePath(), 
".bin");
+            for (File f : objectFileInThisFolder) {
+              objectFileId.updateAndGet(
+                  current ->
+                      Math.max(
+                          current,
+                          Long.parseLong(
+                              f.getName().substring(0, f.getName().length() - 
4).split("-")[2])));
+            }
           }
         }
       }

Reply via email to