Apache9 commented on code in PR #5145:
URL: https://github.com/apache/hbase/pull/5145#discussion_r1152108346


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java:
##########
@@ -96,6 +97,10 @@ public EventHandler prepare() throws Exception {
   public void run() {
     Span span = 
TraceUtil.getGlobalTracer().spanBuilder(getClass().getSimpleName())
       .setParent(Context.current().with(parent)).startSpan();
+    // assume that this is the top of an execution on a new or reused thread, 
that we're safe to
+    // blast any existing MDC state.
+    MDC.clear();

Review Comment:
   I prefer we do something like
   ```
   MDC.put("blabla", "blabla");
   try {
     ...
   } finally {
     MDC.clear();
   }
   ```



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

Reply via email to