Skip to content

tsdb: test OOO mmap recovery across WAL checkpoints - #19756

Closed
aknuds1 wants to merge 1 commit into
prometheus:mainfrom
aknuds1:arve/test-wbl-checkpoint-mmap-recovery
Closed

aknuds1 wants to merge 1 commit into
prometheus:mainfrom
aknuds1:arve/test-wbl-checkpoint-mmap-recovery

Conversation

@aknuds1

@aknuds1 aknuds1 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Add a checkpoint/restart case to TestWBLAndMmapReplay for all seven sample types. It evicts and recreates a series, replays its two WAL references, appends OOO samples until they are mmapped, and checkpoints the WAL before restarting again. The test checks that all samples survive both that restart and a subsequent OOO compaction and restart.

The fixture verifies that the checkpoint covers the recreated series definition, the original WAL segments are removed, and no OOO block exists before the recovery check. It uses the default OOO chunk capacity and compares sample timestamps and values.

Which issue(s) does the PR fix:

Related to #19737.

The identical test patch passes on main at 1d6fe3787e0f0e4f1e0f3cd4e0e12e43079cdc3c. Applied to the complete tree of #19737 at 18f06f3fe079a06943654887fa32bf938601f0ec, it fails for all seven sample types after checkpointing and restarting: only 3 of 35 samples survive. All setup and pre-restart assertions pass. This PR adds coverage for the behavior already present on main.

Historical reproduction on the recorded #19737 tree, with this test patch applied:

go test ./tsdb -run '^TestWBLAndMmapReplay$/./^checkpoint_after_series_recreation$' -v -timeout=5m

Release notes for end users (ALL commits must be considered).

NONE

@aknuds1
aknuds1 force-pushed the arve/test-wbl-checkpoint-mmap-recovery branch from 4edab0f to efd8737 Compare September 23, 2026 14:47
@aknuds1

aknuds1 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

This seems to overlap with #19805, which has since been merged. Closing.

@aknuds1 aknuds1 closed this Sep 23, 2026
@aknuds1
aknuds1 deleted the arve/test-wbl-checkpoint-mmap-recovery branch September 23, 2026 15:13
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.

1 participant