You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sodonnel (via GitHub)" <gi...@apache.org> on 2023/08/29 11:14:48 UTC
[GitHub] [ozone] sodonnel commented on a diff in pull request #5226: HDDS-9216. Update log in exception while processing ICR for container.
sodonnel commented on code in PR #5226:
URL: https://github.com/apache/ozone/pull/5226#discussion_r1308659542
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/IncrementalContainerReportHandler.java:
##########
@@ -108,9 +108,14 @@ public void onMessage(final IncrementalContainerReportFromDatanode report,
} catch (ContainerReplicaNotFoundException e) {
LOG.warn("Container {} replica not found!",
replicaProto.getContainerID());
- } catch (NotLeaderException nle) {
- LOG.warn("Failed to process " + replicaProto.getState()
- + " Container " + id + " due to " + nle);
+ } catch (SCMException ex) {
+ if (ex.getResult() == SCMException.ResultCodes.SCM_NOT_LEADER) {
+ LOG.warn("Failed to process " + replicaProto.getState()
Review Comment:
Can we change this to the log placeholder syntax?
```
LOG.warn("Failed to process {} container {}", replicaProto.getState(), id, ex);
```
I know it was like this before you made this change, but we may as well tidy it up as part of this change.
--
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: issues-unsubscribe@ozone.apache.org
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