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 05:27:04 UTC

[GitHub] [ozone] bharatviswa504 opened a new pull request #2317: HDDS-5323. Avoid unncessary report processing log messages in follower.

bharatviswa504 opened a new pull request #2317:
URL: https://github.com/apache/ozone/pull/2317


   ## What changes were proposed in this pull request?
   
   Avoid distracting logs in SCM followers during report processing. These logs don't add much value, better avoid them.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5323
   
   ## How was this patch tested?
   
   Patched the cluster and now I don't see error logs on the report processing on followers.
   


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


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

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#issuecomment-857858137


   Thank You @mukul1987 and @adoroszlai for the review.


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#discussion_r648148541



##########
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:
       Got it. Intellij has a plugin.




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


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

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#discussion_r648144303



##########
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:
       @adoroszlai Thanks for the report. Curious how you found this Sonar check issue?




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


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

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#discussion_r648166110



##########
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:
       For me when I have installed it locally, it has not shown about this. But anyway addressed this.




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


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

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2317:
URL: https://github.com/apache/ozone/pull/2317#discussion_r648179400



##########
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:
       Thanks for updating the patch.




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


[GitHub] [ozone] bharatviswa504 merged pull request #2317: HDDS-5323. Avoid unncessary report processing log messages in follower.

Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #2317:
URL: https://github.com/apache/ozone/pull/2317


   


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