clintropolis opened a new pull request #9563: add lane enforcement for joinish 
queries
URL: https://github.com/apache/druid/pull/9563
 
 
   ### Description
   
   This PR partially squares up the joins work of #9503, #9533, and #9545 with 
the query laning added in #9407, by extending lane enforcement to queries that 
run with the `LocalQuerySegmentWalker` of `ClientQuerySegmentWalker`, fixing a 
bug that queries that _only_ use the `LocalQuerySegmentWalker` are not counted 
at all. This PR puts things into an interim state so that these queries can 
fall under lane enforcement, but it has a flaw that it will sequentially 
acquire and release lanes for each time the `ClientQuerySegmentWalker` invokes 
either its local or cluster walker to run a part of a query rather than 
acquiring all necessary lanes up front and holding through the duration of the 
query. This is not really an ideal state, since it opens the possibility to 
fail midway through if a query loses a lane to another query, but it is better 
than not counting them, and so worth doing for the short term I think.
   
   Ideally, we could bring up the call to `QueryScheduler.run` into 
`ClientQuerySegmentWalker` or even the http resources, but this isn't currently 
possible without a fairly heavy refactor of how the broker runs queries. This 
is due to how they are transformed on the way down, where 
`QueryScheduler.prioritizeAndLaneQuery` happens on in the deepest part of the 
cluster and local walkers runners right before they call `QueryScheduler.run` 
because that is when the segments participating in the query are available. I'm 
not quite sure what this will look like, yet.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
      - [x] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items apply to every PR. Remove the items which are not done or 
not relevant to the PR. None of the items from the checklist above are strictly 
necessary, but it would be very helpful if you at least self-review the PR. -->
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `LocalQuerySegmentWalker `
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to