You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ay...@apache.org on 2023/04/29 11:55:19 UTC
[hadoop] branch trunk updated: HDFS-16897. Fix abundant Broken pipe exception in BlockSender (#5329). Contributed by fanluo.
This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 1a2cd965a76 HDFS-16897. Fix abundant Broken pipe exception in BlockSender (#5329). Contributed by fanluo.
1a2cd965a76 is described below
commit 1a2cd965a767733a9da88cb93d5c602861fd648e
Author: fanluoo <95...@qq.com>
AuthorDate: Sat Apr 29 19:54:56 2023 +0800
HDFS-16897. Fix abundant Broken pipe exception in BlockSender (#5329). Contributed by fanluo.
Signed-off-by: Ayush Saxena <ay...@apache.org>
---
.../java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
index b2bc09bc392..20dd5e95ef9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java
@@ -654,8 +654,12 @@ class BlockSender implements java.io.Closeable {
if (ioem.startsWith(EIO_ERROR)) {
throw new DiskFileCorruptException("A disk IO error occurred", e);
}
+ String causeMessage = e.getCause() != null ? e.getCause().getMessage() : "";
+ causeMessage = causeMessage != null ? causeMessage : "";
if (!ioem.startsWith("Broken pipe")
- && !ioem.startsWith("Connection reset")) {
+ && !ioem.startsWith("Connection reset")
+ && !causeMessage.startsWith("Broken pipe")
+ && !causeMessage.startsWith("Connection reset")) {
LOG.error("BlockSender.sendChunks() exception: ", e);
datanode.getBlockScanner().markSuspectBlock(
ris.getVolumeRef().getVolume().getStorageID(), block);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org