Fix cross-platform golden-byte flake from the sticky-codec election - #1132
Merged
JohannesLichtenberger merged 1 commit intoJul 21, 2026
Merged
Conversation
GoldenCompositePageTest.keyValueLeafPageBytesArePinned failed on the macOS/Windows CI jobs (and passed on Linux by scheduling luck): the sticky-winner codec election makes a page's emitted codec a function of per-thread serialization history, so when earlier tests in the same fork drove the thread past its warmup with an elected winner, the golden page was encoded with that winner instead of the exhaustive pick-smallest the pinned bytes assume — the documented determinism caveat materializing as a flake. Add PageKind.resetStickyCodecElectionForCurrentThread() and call it in the golden test before serializing, restoring the exhaustive bake-off for the pinned page regardless of prior same-thread work.
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 does this PR do?
Fixes the
mainCI failure introduced by #1131:GoldenCompositePageTest.keyValueLeafPageBytesArePinnedfailed on the macOS and Windows cross-platform jobs (1 of 9368 tests; the Linux jobs passed by scheduling luck). Root cause: the sticky-winner codec election makes a page's emitted codec a function of per-thread serialization history — when earlier tests in the same JVM fork drove the thread past the election warmup with an elected winner, the golden page was encoded with that winner instead of the exhaustive pick-smallest choice the pinned bytes assume. This is exactly the determinism caveat documented with the election, materializing as a cross-platform flake.Fix:
PageKind.resetStickyCodecElectionForCurrentThread()(test hook, documented) + a call in the golden test before serializing, restoring the exhaustive bake-off for the pinned page regardless of prior same-thread work.Related issue
Follow-up to #1131 (the failing run: https://github.com/sirixdb/sirix/actions/runs/29867976108).
Type of change
Checklist
./gradlew buildpasses locally (JDK 25) — targeted verification instead (local wrapper constraint documented in Projection index storage redesign, vectorized serving generalization, and write-path speedups #1131):PageLayoutFuzzTest+KeyValueLeafTest+GoldenCompositePageTestin one JVM (heavy serialization preceding the golden pin — the exact failure ordering) — green.Notes for reviewers
Two-line production change (a documented ThreadLocal reset hook), one call site in the test. The alternative — pinning
-Dsirix.codecBakeoff.probeInterval=1for the whole test JVM — would stop CI from exercising the election at all; the targeted reset keeps it live everywhere else.Generated by Claude Code