ashishkumar50 commented on code in PR #6642:
URL: https://github.com/apache/ozone/pull/6642#discussion_r1590744934
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java:
##########
@@ -335,8 +335,11 @@ public boolean addSCM(AddSCMRequest request) throws
IOException {
}
return raftClientReply.isSuccess();
} catch (IOException e) {
- LOG.error("Failed to update Ratis configuration and add new peer. " +
- "Cannot add new SCM: {}.", scm.getScmId(), e);
+ LOG.warn("Failed to update Ratis configuration and add new peer. " +
+ "Cannot add new SCM: {}. {}", scm.getScmId(), e.getMessage());
+ if (LOG.isDebugEnabled()) {
+ LOG.info("Cannot add new SCM: {}. {}", scm.getScmId(), e);
Review Comment:
May be you want to print in debug and not info.
i) Also `if (LOG.isDebugEnabled())` is not required.
ii) No need to duplicate same log in warn and debug . `"Cannot add new SCM:
{}. {}", scm.getScmId()`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]