sollhui opened a new pull request, #66884:
URL: https://github.com/apache/doris/pull/66884
### What problem does this PR solve?
Issue Number: N/A
Related PR: #66469
Problem Summary:
Cloud Broker Load aborts the active transaction before scheduling a
job-level retry. The pending-task idempotence logic treats any positive
transaction ID as reusable, so the new pending task could reuse an already
aborted transaction. Subsequent rowset prepare requests then fail because the
transaction is no longer in a valid state.
This PR clears the previous attempt's transaction ID after aborting the
Cloud Broker Load transaction. The next pending task therefore begins a new
transaction, while retries within the same pending task can still reuse their
active transaction. If aborting did not complete and the old transaction
remains in PREPARE, the existing label-conflict path can adopt it only after
verifying its status and callback ownership.
### What changed?
- Clear `transactionId` after attempting to abort the previous Cloud Broker
Load transaction.
- Keep transaction reuse unchanged for retries within the same pending task.
- Add unit coverage for clearing the transaction ID after a successful abort.
- Add unit coverage for clearing the stale transaction ID when the abort
call fails.
### Release note
Fix Cloud Broker Load job-level retries so they do not reuse an aborted
transaction.
### Check List (For Author)
- Test: Unit Test
- FE checkstyle and test compilation completed successfully.
- Existing `BrokerLoadJobTest`: 16 tests passed.
- New `CloudBrokerLoadJobTest` compiled; execution was stopped at the
requester's direction.
- Behavior changed: Yes. Cloud Broker Load clears the previous transaction
ID after aborting it for a job-level retry.
- Does this need documentation: No
--
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]