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


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/SegmentCacheManagerFactory.java:
##########
@@ -105,7 +114,8 @@ public SegmentCacheManager manufacturate(File storageDir, 
Long maxSize, boolean
         new SegmentLoaderConfig()
             .setLocations(Collections.singletonList(locationConfig))
             .setVirtualStorage(virtualStorage)
-            .setVirtualStorageIsEphemeral(virtualStorage);
+            .setVirtualStorageIsEphemeral(virtualStorage)
+            .setVirtualStoragePartialDownloadsEnabled(partialDownloadsEnabled);

Review Comment:
   [P2] Preserve the configured partial-download tuning
   
   This fresh `SegmentLoaderConfig` only copies the enable flag, so per-task 
caches silently discard the configured metadata reservation and 
range-fetch/coalescing limits from the injected `druid.segmentCache` 
configuration. In particular, a V10 header larger than the hard-coded 16 MiB 
default still fails while directing the operator to raise 
`druid.segmentCache.virtualStorageMetadataReservationEstimate`, because that 
setting can never reach this cache. Derive this per-task config from the 
injected loader config before replacing the location and ephemeral flags.



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolboxFactory.java:
##########
@@ -247,7 +247,15 @@ public TaskToolbox build(TaskConfig config, Task task)
         .queryProcessingPool(queryProcessingPool)
         .joinableFactory(joinableFactory)
         .monitorSchedulerProvider(monitorSchedulerProvider)
-        
.segmentCacheManager(segmentCacheManagerFactory.manufacturate(taskWorkDir, 
null, true))
+        .segmentCacheManager(segmentCacheManagerFactory.manufacturate(
+            taskWorkDir,
+            null,
+            true,
+            task.getContextValue(

Review Comment:
   [P2] Parse the query-context boolean before unboxing
   
   This key is also exposed as an MSQ query-context parameter, whose 
`QueryContext.getBoolean` contract accepts string booleans. If a request 
supplies `"false"`, that value is copied into the worker task context, but this 
raw generic lookup returns a `String` and unboxing it as `boolean` throws 
`ClassCastException` while constructing the toolbox, before 
`IndexerWorkerContext` can use the proper parser. Parse the value with 
`QueryContext` or the existing boolean conversion utility.



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