leventov commented on a change in pull request #7595: Optimize overshadowed segments computation URL: https://github.com/apache/incubator-druid/pull/7595#discussion_r286086550
########## File path: server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentManager.java ########## @@ -744,6 +757,32 @@ public DataSegment map(int index, ResultSet r, StatementContext ctx) throws SQLE // Replace "dataSources" atomically. dataSources = newDataSources; + overshadowedSegments = ImmutableSet.copyOf(determineOvershadowedSegments(segments)); Review comment: > when some dataSources are enabled or disabled outside doPoll Yes. Also note that there are additional changes here: #7653 (see section "SQLMetadataSegmentManager: remove data from dataSources in markAsUnusedSegmentsInInterval and markSegmentsAsUnused"), which were missed in #7490. > Also, if they do become invalid, would a comment be enough, or something should be done in code to prevent invalid overshadowed segments ? I think `overshadowedSegments` should become invalidated. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org