kfaraz commented on code in PR #16162: URL: https://github.com/apache/druid/pull/16162#discussion_r1579171442
########## server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java: ########## @@ -166,8 +168,26 @@ public class StreamAppenderator implements Appenderator private final AtomicBoolean closed = new AtomicBoolean(false); - private final ConcurrentHashMap<SegmentId, Set<SegmentIdWithShardSpec>> - baseSegmentToUpgradedVersions = new ConcurrentHashMap<>(); + /** + * Map from base segment identifier of a sink to the set of all the segment ids associated with it. + * The set contains the base segment itself and its upgraded versions announced as a result of a concurrent replace. + * The map contains all the available sinks' identifiers in its keyset. + */ + private final ConcurrentMap<SegmentIdWithShardSpec, Set<SegmentIdWithShardSpec>> baseSegmentToUpgradedSegments + = new ConcurrentHashMap<>(); + /** + * Map from the id of an upgraded pending segment to the segment corresponding to its upgradedFromSegmentId. Review Comment: Thanks for the javadocs! -- 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]
