From 7a37d9572f827a1af00a75ac93c4874a40c3eb07 Mon Sep 17 00:00:00 2001 From: tom lee Date: Fri, 22 Apr 2022 17:19:42 +0800 Subject: [PATCH] HDFS-16557. BootstrapStandby failed because of checking Gap for inprogress EditLogInputStream --- .../java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java index 850b2fc5708..a2614a5ccb8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java @@ -1792,7 +1792,7 @@ public class FSEditLog implements LogsPurgeable { EditLogInputStream elis = iter.next(); if (elis.getFirstTxId() > txId) break; long next = elis.getLastTxId(); - if (next == HdfsServerConstants.INVALID_TXID) { + if (next == HdfsServerConstants.INVALID_TXID || elis.isInProgress()) { if (!inProgressOk) { throw new RuntimeException("inProgressOk = false, but " + "selectInputStreams returned an in-progress edit " +