abhishekrb19 commented on code in PR #18687:
URL: https://github.com/apache/druid/pull/18687#discussion_r2458446029


##########
server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:
##########
@@ -853,7 +858,8 @@ public void mount(StorageLocation mountLocation) throws 
SegmentLoadingException
           final SegmentizerFactory factory = getSegmentFactory(storageDir);
 
           @SuppressWarnings("ObjectEquality")
-          final boolean lazy = config.isLazyLoadOnStart() && lazyLoadCallback 
!= SegmentLazyLoadFailCallback.NOOP;
+          final boolean lazy = loadStrategy.shouldLoadLazily(dataSegment)
+                               && lazyLoadCallback != 
SegmentLazyLoadFailCallback.NOOP;

Review Comment:
   Just to confirm that this would only affect bootstrapping flow and not other 
features like virtual fabric / on-demand queries that @clintropolis was working 
on? 
   I'm asking because this config usage is deep in the segment load flow that 
can  inadvertently affect other features since it's used by 4-5 related callers 
(I can help double check on this later)
   
   
   Alternatively, it'd be cleaner and safer to move the lod logic to 
`SegmentCacheBootstrapper` where we know certainly that it'd be secluded to the 
segment bootstrapping logic on data servers. For example, it can be somewhere 
in `SegmentCacheBootstrapper#loadSegmentsOnStartup()` where the segment loader 
config is present.
   
   



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

Reply via email to