leventov commented on a change in pull request #7595: Optimize overshadowed 
segments computation
URL: https://github.com/apache/incubator-druid/pull/7595#discussion_r286089955
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorRuleRunner.java
 ##########
 @@ -84,8 +85,10 @@ public DruidCoordinatorRuntimeParams 
run(DruidCoordinatorRuntimeParams params)
     // find available segments which are not overshadowed by other segments in 
DB
     // only those would need to be loaded/dropped
     // anything overshadowed by served segments is dropped automatically by 
DruidCoordinatorCleanupOvershadowed
-    final Set<DataSegment> overshadowed = ImmutableDruidDataSource
-        .determineOvershadowedSegments(params.getAvailableSegments());
+    // If metadata store hasn't been polled yet, use empty overshadowed list
+    final Collection<DataSegment> overshadowed = Optional
+        
.ofNullable(coordinator.getMetadataSegmentManager().findOvershadowedSegments())
 
 Review comment:
   Why are you reluctant to make changes to `DataSegment`? You refer to the 
design as "debated" or "not settled", well, we should resolve the debate and 
settle somewhere. I expressed my view in #7571. If you disagree with some parts 
of it, please respond in that issue.
   
   I'm concerned with keeping the status quo because if 
`DataSegmentWithOvershadowedStatus` will leak into Druid 0.15 API, it will be 
much harder (transition PRs, compatibility, etc.) to remove it eventually. So I 
really want it to go away before Druid 0.15 is released.

----------------------------------------------------------------
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