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: [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]