You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/06/09 08:41:51 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2317: HDDS-5323. Avoid unncessary report processing log messages in follower.

adoroszlai commented on a change in pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#discussion_r648094306



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java
##########
@@ -90,8 +91,12 @@ public void onMessage(PipelineReportFromDatanode pipelineReportFromDatanode,
       try {
         processPipelineReport(report, dn, publisher);
       } catch (IOException e) {
-        LOGGER.error("Could not process pipeline report={} from dn={}.",
-            report, dn, e);
+        // Avoid NotLeaderException logging which happens when processing
+        // pipeline report on followers.
+        if (!(e instanceof NotLeaderException)) {

Review comment:
       SonarLint: Replace the usage of the `instanceof` operator by a catch block.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org