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

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

commit 3f6f5c71c283c5a222264199913b0bc4d173f10a
Author: OneSizeFitQuorum <[email protected]>
AuthorDate: Sat Jun 29 17:37:35 2024 +0800

    fix
    
    Signed-off-by: OneSizeFitQuorum <[email protected]>
---
 .../db/storageengine/dataregion/wal/io/WALInputStream.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
index 06a677c309b..350f8f5e995 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java
@@ -258,14 +258,14 @@ public class WALInputStream extends InputStream 
implements AutoCloseable {
   private void tryLoadSegment() throws IOException {
     long originPosition = channel.position();
     try {
-      loadNextSegmentV2();
-      version = WALFileVersion.V2;
+      loadNextSegmentV1();
+      version = WALFileVersion.V1;
     } catch (Throwable e) {
       // failed to load in V2 way, try in V1 way
       channel.position(originPosition);
-      loadNextSegmentV1();
-      version = WALFileVersion.V1;
-      logger.info("Failed to load WAL segment in V2 way, try in V1 way 
successfully.");
+      loadNextSegmentV2();
+      version = WALFileVersion.V2;
+      logger.info("Failed to load WAL segment in V1 way, try in V2 way 
successfully.");
     }
   }
 

Reply via email to