You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by er...@apache.org on 2022/08/23 06:04:45 UTC

[iotdb] branch master updated: [IOTDB-4210] Fix deadlock during WALNode recover if there's no suitable tsfiles (#7087)

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

ericpai 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 150686d0bd [IOTDB-4210] Fix deadlock during WALNode recover if there's no suitable tsfiles (#7087)
150686d0bd is described below

commit 150686d0bd3c444ebffb3ad19e85d3f05f6911a6
Author: BaiJian <er...@hotmail.com>
AuthorDate: Tue Aug 23 14:04:37 2022 +0800

    [IOTDB-4210] Fix deadlock during WALNode recover if there's no suitable tsfiles (#7087)
---
 .../java/org/apache/iotdb/db/wal/recover/WALNodeRecoverTask.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/wal/recover/WALNodeRecoverTask.java b/server/src/main/java/org/apache/iotdb/db/wal/recover/WALNodeRecoverTask.java
index d5a13e2596..755bc3568d 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/recover/WALNodeRecoverTask.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/recover/WALNodeRecoverTask.java
@@ -226,6 +226,7 @@ public class WALNodeRecoverTask implements Runnable {
                 WALFileUtils.walFilenameFilter(dir, name)
                     && WALFileUtils.parseVersionId(name) >= firstValidVersionId);
     if (walFiles == null) {
+      endRecovery();
       return;
     }
     // asc sort by version id
@@ -254,6 +255,10 @@ public class WALNodeRecoverTask implements Runnable {
         logger.warn("Fail to read wal logs from {}, skip them", walFile, e);
       }
     }
+    endRecovery();
+  }
+
+  private void endRecovery() {
     // end recovering all recover performers
     for (UnsealedTsFileRecoverPerformer recoverPerformer : memTableId2RecoverPerformer.values()) {
       try {