clintropolis opened a new pull request, #19397:
URL: https://github.com/apache/druid/pull/19397

   ### Description
   This PR adds an async variant of `CursorFactory.makeCursorHolder` and 
migrates MSQ frame processors to use it, so that future cursor factories backed 
by partial / lazy-loaded storage can perform I/O without blocking the 
processing     
     thread. This PR introduces no partial-loading behavior on its own, instead 
it just establishes the integration shape for more upcoming partial-segment 
work that will follow this PR. Every existing cursor factory remains 
synchronous via the default implementation which just calls 
`Futures.immediateFuture(makeCursorHolder(spec))`.
   
   Worth noting, I am planning some changes in a separate PR for V10 segments 
so that a partial segment can provide a `TimeBoundaryInspector` for usage by 
`GroupByPreShuffleFrameProcessor` without needing to download any column data 
so we can avoid making an async variant of it.
   
   changes:
   * add `CursorFactory.makeCursorHolderAsync(CursorBuildSpec)` for cursor 
factories backed by partial downloads can do I/O without blocking processing 
threads, with a default implementation returning 
`Futures.immediateFuture(makeCursorHolder(spec))` so existing implementations 
remain async-correct without changes
   * add `GroupingEngine.processAsync` returning 
`ListenableFuture<Sequence<ResultRow>>` that uses `makeCursorHolderAsync`, 
extracting shared `processWithCursorHolder` helper from 
`GroupingEngine.process()`
   * migrate `ScanQueryFrameProcessor.runWithSegment` to call 
`makeCursorHolderAsync` and yield via `ReturnOrAwait.awaitAllFutures` while the 
future is  pending
   * migrate `GroupByPreShuffleFrameProcessor.runWithSegment` cursor path to 
call `GroupingEngine.processAsync` and yield via `ReturnOrAwait.awaitAllFutures`
   


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