[#309] Add MVCC diagnostics to TreeTransactionalLifetimeTest.createRemoveByStep - #310
Merged
vharseko merged 1 commit intoSep 25, 2026
Conversation
…ifetimeTest.createRemoveByStep The pre-crash assert in createRemoveByStepHelper intermittently reports a tree created at step 1 as visible at step 0 (CI only, not reproducible locally or in Linux/JDK 21 containers). Keep the assert unchanged, but on mismatch include the tree's TimelyResource chain per step, the Tree instance returned by getTree() per step, the active transaction cache bounds and the TransactionIndex buckets, so the next CI occurrence shows which version makes the tree visible. Refs OpenIdentityPlatform#309
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.
Refs #309. This PR does not close the issue: it adds diagnostics only.
Problem
TreeTransactionalLifetimeTest.createRemoveByStepstill fails intermittently on CI (ubuntu-latest / JDK 21):Line 215 is the assert that runs inside the still-open
ttlt5crtransaction, before its crash. A tree created at step 1 is reported visible at step 0 of the same transaction, while steps 1-4 are all correct (including "not visible" at step 3, afterremoveTree()). This is the same signature as #260 / #264. #266 (MVCC settle at the end ofPersistit.initialize()) is already on master, so that explanation is incomplete.ttlt5cris also a fresh tree name that nothing from the earlier crashed cases refers to.Reading the code did not reveal the mechanism, and reproduction failed:
Change
Test-only. The assert is unchanged. On an
expected1mismatch the failure message now also carries:TimelyResourceversion chain after each step and at the failure. It is read reflectively, becauseTree#toString()callsversion(), which can add a version and change the state being reported;TreeinstancegetTree()returns at each step (same object or a different one);TransactionIndexbuckets.The next CI occurrence will then show which entry makes the tree visible at step 0, which is what a product fix needs.
Verification
TreeTransactionalLifetimeTest: 5/5 green (JDK 21).ttlt5cr'sexpected1. The message showed the expected chain (ts=…#01,#03deleted,#04) and the per-stepgetTreeresults. The change was reverted afterwards.