jtuglu-netflix commented on code in PR #18014:
URL: https://github.com/apache/druid/pull/18014#discussion_r2094953991
##########
server/src/main/java/org/apache/druid/segment/realtime/SegmentGenerationMetrics.java:
##########
@@ -297,7 +313,12 @@ public SegmentGenerationMetrics snapshot()
messageGapSnapshot = System.currentTimeMillis() - maxTimestamp;
}
retVal.messageGap.set(messageGapSnapshot);
- retVal.messageGapStats.set(messageGapStats.getAndSet(new
MessageGapStats()));
Review Comment:
> can these ever happen in the current code
This can happen in the current code with atomic reference, that was the
example I gave. My previous version would also have that case, but it was
guarded by the `synchronize`. Once the immutable copy is made in the
snapshot(), then it is only single-threaded accesses.
--
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]