kfaraz commented on code in PR #18489:
URL: https://github.com/apache/druid/pull/18489#discussion_r2630147204
##########
server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:
##########
@@ -225,22 +227,50 @@ public List<DataSegment> getCachedSegments() throws
IOException
}
}
- final List<DataSegment> cachedSegments = new ArrayList<>();
+ final ConcurrentLinkedQueue<DataSegment> cachedSegments = new
ConcurrentLinkedQueue<>();
final File[] segmentsToLoad = retrieveSegmentMetadataFiles();
+ final CountDownLatch latch = new CountDownLatch(segmentsToLoad.length);
+
+ // If there is no dedicated bootstrap executor, perform the loading
sequentially on the current thread.
+ final boolean isLoadingSegmentCacheFromDiskWithoutBootstrapExecutor =
loadOnBootstrapExec == null;
Review Comment:
Nit: seems a little verbose 🙂 , especially since it is just to be used in
this method.
You may call this variable `loadSegmentsSequentially` or
`useBootstrapLoadExec` (with the inverse condition).
--
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]