You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "fanluoo (via GitHub)" <gi...@apache.org> on 2023/04/28 11:57:31 UTC
[GitHub] [hadoop] fanluoo commented on a diff in pull request #5329: HDFS-16897. fix abundant Broken pipe exception in BlockSender
fanluoo commented on code in PR #5329:
URL: https://github.com/apache/hadoop/pull/5329#discussion_r1180318725
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java:
##########
@@ -655,8 +655,11 @@ private int sendPacket(ByteBuffer pkt, int maxChunks, OutputStream out,
if (ioem.startsWith(EIO_ERROR)) {
throw new DiskFileCorruptException("A disk IO error occurred", e);
}
+ String causeMessage = e.getCause() != null ? e.getCause().getMessage() : "";
if (!ioem.startsWith("Broken pipe")
- && !ioem.startsWith("Connection reset")) {
+ && !ioem.startsWith("Connection reset")
+ && !causeMessage.startsWith("Broken pipe")
+ && !causeMessage.startsWith("Connection reset")) {
Review Comment:
> @fanluoo in case you missed it, can you address this
You're right. Let me improve it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org