FrankChen021 commented on code in PR #19396:
URL: https://github.com/apache/druid/pull/19396#discussion_r3181977849


##########
server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:
##########
@@ -152,14 +156,32 @@ public SegmentLocalCacheManager(
           location.setAreWeakEntriesEphemeral(true);
         }
       }
-      virtualStorageLoadOnDemandExec =
-          MoreExecutors.listeningDecorator(
-              // probably replace this with virtual threads once minimum 
version is java 21
-              Executors.newFixedThreadPool(
-                  config.getVirtualStorageLoadThreads(),
-                  
Execs.makeThreadFactory("VirtualStorageOnDemandLoadingThread-%s")
-              )
-          );
+      if (config.isVirtualStorageUseVirtualThreads()) {
+        log.info(
+            "Using virtual storage mode with virtual threads - max concurrent 
on demand loads: [%d].",
+            config.getVirtualStorageLoadThreads()

Review Comment:
   P2 Validate virtualStorageLoadThreads before using it as a semaphore limit
   
   With virtualStorageUseVirtualThreads=true, setting 
druid.segmentCache.virtualStorageLoadThreads to 0 now creates a Semaphore with 
zero permits. Every on-demand load task then blocks forever in 
acquireUninterruptibly(), so queries wait until timeout instead of failing fast 
at startup. The old fixed-thread-pool path rejected 0 via 
Executors.newFixedThreadPool(0). Please validate virtualStorageLoadThreads > 0 
for both modes, or otherwise preserve fail-fast behavior.



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