Fly-Style commented on code in PR #19212:
URL: https://github.com/apache/druid/pull/19212#discussion_r3026048518
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/MetadataSegmentView.java:
##########
@@ -71,21 +82,38 @@ public class MetadataSegmentView
/**
* Use {@link ImmutableSortedSet} so that the order of segments is
deterministic and
* sys.segments queries return the segments in sorted order based on
segmentId.
- *
+ * <p>
* Volatile since this reference is reassigned in {@code poll()} and then
read in {@code getPublishedSegments()}
* from other threads.
*/
@MonotonicNonNull
private volatile ImmutableSortedSet<SegmentStatusInCluster>
publishedSegments = null;
+
+ /**
+ * Collection of callbacks watching on segments changes.
+ */
+ private final ConcurrentMap<MetadataSegmentViewCallback, Executor>
segmentViewCallbacks;
/**
- * Caches the replication factor for segment IDs. In case of coordinator
restarts or leadership re-elections, the coordinator API returns `null`
replication factor until load rules are evaluated.
+ * A set containing the identifiers of the segments currently being managed
or tracked by this view.
+ * <p>
+ * This field is immutable and provides a snapshot of segment identifiers at
a given point
Review Comment:
It's a leftover after trying different approaches, will remove.
--
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]