xy720 opened a new pull request, #69807:
URL: https://github.com/apache/doris/pull/69807
pick from master #68628
When `VTabletWriter` opens new node channels during execution, it closes
channels in two stages. Initial channels receive `hang_wait` EOS requests;
senders wait for this first-stage barrier before closing their incrementally
opened channels.
The receiver polls `is_finished()` inside the heavy work pool. Early EOS
tasks can occupy every worker while waiting for the remaining senders, whose
EOS tasks are queued in the same pool, so the heavy work pool can be starved
and never make progress.
Replace polling with a one-shot sender-arrival completion shared by each
tablets channel, so early EOS tasks release their heavy workers while their
RPCs remain pending. Cancellation or channel expiration releases pending
waiters with `Cancelled`.
Conflict resolution for branch-4.1: branch-4.1 still supports single replica
load, whose local close path needs the EOS request (`write_single_replica`,
`slave_tablet_nodes`) and the `LoadChannel` (slave replica wait timeout). So
`_close_and_notify()` and `_close_writers()` take `parent` and `req` instead of
only `sender_id`.
(cherry picked from commit ec0fe00cce244b1cca51400db3fd0f0f44835829)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### 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? -->
- Behavior changed:
- [x] No.
- [ ] Yes. <!-- Explain the behavior change -->
- 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]