0AyanamiRei opened a new pull request, #67250:
URL: https://github.com/apache/doris/pull/67250
### What problem does this PR solve?
Issue Number: N/A
Related PR: #66987
Problem Summary:
In cloud mode, a Broker Load attempt can have many loading tasks queued in
the FE executor. After the first task failure moves the job to RETRY, a queued
task can currently move it back to LOADING. This allows several concurrent
failures to enter the job-level retry path and wait on the shared idToTasks map.
An older retry handler can consequently follow tasks from a newer attempt.
If that newer attempt finishes successfully, the stale handler can overwrite
FINISHED with PENDING, schedule another pending task, and reuse the already
VISIBLE transaction. New rowsets are then rejected by Meta Service because the
transaction is no longer PREPARED.
This change closes the current attempt once the job enters RETRY and
verifies that the job is still RETRY before scheduling the next PENDING
attempt. It does not change transaction protocols, Meta Service behavior, or
the non-cloud retry implementation.
### Release note
Fix Cloud Broker Load jobs being retried after a later attempt already
finished.
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test (focused coverage added; not executed locally per
request)
- [ ] Manual test
- [ ] No need to test or manual test
- Behavior changed:
- [ ] No.
- [x] Yes. Loading tasks from a closed attempt can no longer reopen a
retrying job, and stale retry handlers cannot revive a completed job.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]