zhaixiangli opened a new pull request, #69589:
URL: https://github.com/apache/doris/pull/69589

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary:
   
   For colocate joins, Nereids selected the worker for a bucket from the first 
tablet of the first non-pruned ScanNode. It did not verify that the selected 
backend had a queryable replica for every tablet in the same bucket across all 
participating Olap ScanNodes. When replica layouts differed temporarily, 
assignment could fail later with `Can not find tablet ... in the bucket` even 
though another backend was common to all tablets.
   
   This PR intersects the queryable replica backends of all tablets in the 
current bucket across all participating Olap ScanNodes, then applies the 
existing backend preference and minimum-workload selection to that common 
candidate list. If no common queryable backend exists, it reports an explicit 
analysis error. The intersection keeps a single candidate list bounded by the 
replica count and does not allocate a Map or Set per tablet.
   
   ### Release note
   
   Fix Nereids colocate bucket scheduling to select a queryable backend shared 
by all scanned tablets.
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
     Added unit tests for mismatched replica layouts, no common queryable 
backend, and query-disabled common replicas. The tests were not run locally; CI 
will verify them.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Colocate bucket scheduling now chooses a backend common to 
every scanned tablet instead of selecting from only the first tablet.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->


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