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

sodonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new f1e94fc801 HDDS-7825. Warn when EC write exception occurs (#4201)
f1e94fc801 is described below

commit f1e94fc80168cab1a0114c009ec64060b96b155d
Author: Michael Smith <[email protected]>
AuthorDate: Tue Jan 24 03:37:08 2023 -0800

    HDDS-7825. Warn when EC write exception occurs (#4201)
    
    Normalize logStreamError so that EC write errors are logged at WARN
    level all the time, not just when logging at DEBUG level.
---
 .../org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
 
b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
index 7d5a06fc52..a19a8f762c 100644
--- 
a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
+++ 
b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
@@ -217,6 +217,10 @@ public final class ECKeyOutputStream extends 
KeyOutputStream {
 
   private void logStreamError(List<ECBlockOutputStream> failedStreams,
                               String operation) {
+    if (!LOG.isWarnEnabled()) {
+      return;
+    }
+
     Set<Integer> failedStreamIndexSet =
             
failedStreams.stream().map(ECBlockOutputStream::getReplicationIndex)
                     .collect(Collectors.toSet());
@@ -242,9 +246,7 @@ public final class ECKeyOutputStream extends 
KeyOutputStream {
     List<ECBlockOutputStream> failedStreams =
         streamEntry.streamsWithWriteFailure();
     if (!failedStreams.isEmpty()) {
-      if (LOG.isDebugEnabled()) {
-        logStreamError(failedStreams, "EC stripe write");
-      }
+      logStreamError(failedStreams, "EC stripe write");
       excludePipelineAndFailedDN(streamEntry.getPipeline(), failedStreams);
       return StripeWriteStatus.FAILED;
     }
@@ -259,9 +261,7 @@ public final class ECKeyOutputStream extends 
KeyOutputStream {
 
     failedStreams = streamEntry.streamsWithPutBlockFailure();
     if (!failedStreams.isEmpty()) {
-      if (LOG.isDebugEnabled()) {
-        logStreamError(failedStreams, "Put block");
-      }
+      logStreamError(failedStreams, "Put block");
       excludePipelineAndFailedDN(streamEntry.getPipeline(), failedStreams);
       return StripeWriteStatus.FAILED;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to