gianm commented on a change in pull request #7425: Add is_overshadowed column 
to sys.segments table
URL: https://github.com/apache/incubator-druid/pull/7425#discussion_r276882763
 
 

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/schema/MetadataSegmentView.java
 ##########
 @@ -143,10 +146,16 @@ private void poll()
 
     final DateTime timestamp = DateTimes.nowUtc();
     while (metadataSegments.hasNext()) {
-      final DataSegment interned = 
DataSegmentInterner.intern(metadataSegments.next());
+      final SegmentWithOvershadowedStatus segment = metadataSegments.next();
+      final DataSegment interned = 
DataSegmentInterner.intern(segment.getDataSegment());
+      final SegmentWithOvershadowedStatus segmentWithOvershadowedStatus = new 
SegmentWithOvershadowedStatus(
+          interned,
+          segment.isOvershadowed()
+      );
       // timestamp is used to filter deleted segments
-      publishedSegments.put(interned, timestamp);
 
 Review comment:
   If I was you I would probably do (2) and then consider if there's a way to 
address the raciness in a future patch.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to