Skip to content

IGNITE-28675 Fix flaky TxDeadlockCauseTest #testCause, #testCauseSeveralNodes#13136

Open
zstan wants to merge 3 commits into
apache:masterfrom
zstan:ignite-28675
Open

IGNITE-28675 Fix flaky TxDeadlockCauseTest #testCause, #testCauseSeveralNodes#13136
zstan wants to merge 3 commits into
apache:masterfrom
zstan:ignite-28675

Conversation

@zstan
Copy link
Copy Markdown
Contributor

@zstan zstan commented May 14, 2026

No description provided.

@zstan
Copy link
Copy Markdown
Contributor Author

zstan commented May 14, 2026

From documentation:
https://ignite.apache.org/docs/ignite2/latest/key-value-api/transactions
However, if a deadlock is detected, the cause of the returned TransactionTimeoutException will be TransactionDeadlockException (at least for one transaction involved in the deadlock).

@zstan zstan changed the title IGNITE-28675 Fix flaky TxDeadlockCauseTest#testCause IGNITE-28675 Fix flaky TxDeadlockCauseTest #testCause, #testCauseSeveralNodes May 15, 2026
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@zstan
Copy link
Copy Markdown
Contributor Author

zstan commented May 15, 2026

@ignitetcbot
Copy link
Copy Markdown
Contributor

TCBot Test Analysis

Possible Blockers (0)

No blockers found.

New Tests (0)

No new tests found.

@ignitetcbot
Copy link
Copy Markdown
Contributor

Thanks for working on this flaky test. I have two small suggestions:

  1. Please reconsider making TxDeadlockDetection.deadLockTimeout static final while TxDeadlockDetectionNoHangsTest relies on @WithSystemProperty. In the suite, earlier tests can initialize TxDeadlockDetection before the class-level property is applied, so this test may still use the default timeout. A safer option is to read IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT when creating the timeout object, or keep an explicit test hook. See TxDeadlockDetection, TxDeadlockDetectionNoHangsTest, and suite order in TxDeadlockDetectionTestSuite.

  2. In TxDeadlockCauseTest, the new catch stores only exceptions that already have TransactionDeadlockException. If both transaction threads fail for another reason, the test will lose the original failure and report only assertNotNull. Could we keep the first non-deadlock exception as a diagnostic fallback, but still prefer the deadlock exception when it appears? See checkCauseObject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants