KKcorps opened a new pull request, #18906:
URL: https://github.com/apache/pinot/pull/18906

   ## What
   
   Adds a `protected List<String> getUnavailableSegments(BrokerRequest 
serverBrokerRequest, TableRouteInfo routeInfo)` hook to 
`BaseSingleStageBrokerRequestHandler`.
   
   - The default returns `routeInfo.getUnavailableSegments()` unchanged.
   - Both read sites in `handleRequest` (the main routing path and the 
materialized-view-split fallback) now call the hook instead of reading the 
route directly.
   
   ## Why
   
   The single-stage handler builds the "segments unavailable" warning from 
`routeInfo.getUnavailableSegments()` before any subclass gets to post-process 
the route in `processBrokerRequest`. A subclass that prunes routing (e.g. 
narrowing a query to a single snapshot/version) has no way to keep that warning 
in sync, so it can report segments the query will never actually read.
   
   This hook is the extension point: a subclass can narrow the reported 
unavailable segments to the set the query will actually read after 
routing-level pruning.
   
   ## Behavior change
   
   None for OSS or existing tables — the default hook returns the same list the 
code read before.
   
   ## Testing
   
   Existing `pinot-broker` tests pass. The hook has no standalone behavior to 
test beyond the passthrough default, which existing routing/handler tests 
already exercise.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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