[fix](fe) Keep schema change waiting on conflict txn abort failure#65196
Open
Yukang-Lian wants to merge 1 commit into
Open
[fix](fe) Keep schema change waiting on conflict txn abort failure#65196Yukang-Lian wants to merge 1 commit into
Yukang-Lian wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: A cloud schema change job in WAITING_TXN can abort failed conflict transactions to make progress. If the conflict transaction is concurrently cleaned up, already aborted, or otherwise no longer abortable, abortTransaction throws a UserException. The schema change scheduler previously propagated that exception as AlterCancelException, so AlterJobV2.run cancelled the schema change job even though the job should simply wait and re-check conflict transactions in the next round. This change makes conflict transaction abort best-effort inside SchemaChangeJobV2: an abort failure keeps the schema change job in WAITING_TXN and lets the next scheduler round re-query transaction state. The regression case now fails immediately with the observed schema change state if the job is cancelled or stuck, instead of using an opaque assertEquals(1,2).
### Release note
None
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run org.apache.doris.alter.CloudIndexTest#testSchemaChangeWaitsWhenConflictTxnAbortFails
- ./run-fe-ut.sh --run org.apache.doris.alter.CloudIndexTest
- git diff --check -- fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java fe/fe-core/src/test/java/org/apache/doris/alter/CloudIndexTest.java regression-test/suites/schema_change_p0/test_abort_txn_by_fe.groovy
- Behavior changed: No
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Collaborator
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29536 ms |
Contributor
TPC-DS: Total hot run time: 172988 ms |
Contributor
ClickBench: Total hot run time: 25.24 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
A cloud schema change job in WAITING_TXN uses
checkFailedPreviousLoadAndAbort()to abort failed conflict transactions and make progress. If that conflict transaction is concurrently cleaned up, already aborted, visible, or otherwise no longer abortable,abortTransaction()can throwUserException. Before this patch,runWaitingTxnJob()propagated that exception asAlterCancelException, andAlterJobV2.run()cancelled the schema change job.This patch makes conflict transaction abort best-effort for schema change: abort failure keeps the job in WAITING_TXN and lets the next scheduler round re-query transaction state. The docker regression case also now reports the actual schema change state and fails immediately on CANCELLED instead of using opaque
assertEquals(1,2)fallbacks.