rajeshkumarchandolu commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4705235270
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -231,9 +239,12 @@ public CompletableFuture<Message> applyTransaction(
// in both places. No-op once the datanode protocol server has started.
tryStartDNServerAndRefreshSafeMode();
} catch (Exception ex) {
+ TracingUtil.recordException(span, ex);
+ span.end();
Review Comment:
It isn't redundant. ExitUtils.terminate() ends in System.exit(), so the
finally doesn't run on this path, and the span.end() in the catch is the only
one that does. It hands the span to the BatchSpanProcessor, which is best
effort, since SCM doesn't flush the tracer on shutdown. On all other paths the
finally ends the span. As you suggested, I've added a one-line comment above it
saying 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.
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]