adoroszlai commented on a change in pull request #2992:
URL: https://github.com/apache/ozone/pull/2992#discussion_r785831715
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAInvocationHandler.java
##########
@@ -110,8 +110,16 @@ private Object invokeRatis(Method method, Object[] args)
response = ratisHandler.submitRequest(
scmRatisRequest);
}
- LOG.info("Invoking method {} on target {}, cost {}us",
- method, ratisHandler, (Time.monotonicNowNanos() - startTime) / 1000.0);
+
+ if (response.isSuccess()) {
+ LOG.trace("Invoking method {} on target {}, cost {}us",
+ method, ratisHandler,
+ (Time.monotonicNowNanos() - startTime) / 1000.0);
+ } else {
+ LOG.info("Invoking method {} on target {}, cost {}us",
+ method, ratisHandler,
+ (Time.monotonicNowNanos() - startTime) / 1000.0);
+ }
Review comment:
```suggestion
double elapsed = (Time.monotonicNowNanos() - startTime) / 1000.0;
String msg = "Invoking method {} on target {}, cost {}us";
if (response.isSuccess()) {
LOG.trace(msg, method, ratisHandler, elapsed);
} else {
LOG.info(msg, method, ratisHandler, elapsed);
}
```
--
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]