snleee commented on a change in pull request #8443: URL: https://github.com/apache/pinot/pull/8443#discussion_r839151107
########## File path: pinot-core/src/main/java/org/apache/pinot/core/util/trace/TraceContext.java ########## @@ -67,7 +68,7 @@ JsonNode toJson() { final String _traceId; final List<LogEntry> _logs = new ArrayList<>(); - int _numChildren = 0; + AtomicInteger _numChildren = new AtomicInteger(0); Review comment: Are you concerned with the case where multiple threads try to increment the `_numChildren`? Since we access Trace via `ThreadLocal<TraceEntry>`, it looks like we only access the trace object from a single thread. @Jackie-Jiang Can you confirm 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org