From 4f4b84698658c42efd5f7af0c6061546f6fb7ce8 Mon Sep 17 00:00:00 2001 From: hfutatzhanghb Date: Thu, 1 Feb 2024 22:53:37 +0800 Subject: [PATCH] HDFS-17359. EC: recheck failed streamers should only after flushing all packets. (#6503). Contributed by farmmamba. Signed-off-by: Takanobu Asanuma --- .../java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java index a58c7bbb20..8320cc9a40 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java @@ -671,9 +671,9 @@ private void checkStreamerFailures(boolean isNeedFlushAllPackets) // for healthy streamers, wait till all of them have fetched the new block // and flushed out all the enqueued packets. flushAllInternals(); + // recheck failed streamers again after the flush + newFailed = checkStreamers(); } - // recheck failed streamers again after the flush - newFailed = checkStreamers(); while (newFailed.size() > 0) { failedStreamers.addAll(newFailed); coordinator.clearFailureStates();