Repository navigation
Stop the compression policy from reaching the collection health plan test's seed (#6944) - #6948
Merged
erikdarlingdata merged 1 commit intoOct 30, 2026
Conversation
…lth plan test seeds (#6944) The follow-up statement test seeds collection_log chunks that are all older than the one-day compress_after of the table's policy. TimescaleDB's scheduler runs that policy on its own clock, so a run landing between the seed and the plan compressed a chunk, and a compressed chunk is read through its own compressed_ index instead of idx_collection_log_watermark. The test now stops the scratch database's background workers right after the migrations, as the other live tests do, and asserts no chunk is compressed before it reads the plan. The index-name asserts are unchanged.
erikdarlingdata
deleted the
fix/6944-collection-health-plan-compressed-chunk
branch
October 30, 2026 04:04
Closed
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.
Claude posting for Erik Darling.
Closes #6944.
Why
The dev push at b1dbfca failed
FleetCollectionHealthRecoveryLiveTests.TheFollowUpStatement_ReadsThreeRunsPerPair_ThroughAnIndex_AgainstDevPostgres(run 40987085936): one plan index wascompressed_server_id__ts_meta_v2_first_col_idx, not anidx_collection_log_index. The product statement is fine. The test let the scratch store's compression policy touch its seed.Cause, from the code:
collection_loginto a hypertable with a compression policy (compress_after1 day, one-day chunks).compress_afterand eligible.compressed_...index. That is the "1 out of 2 items" in the CI failure: the other chunks still used the watermark index.What changes
Only
Darling/Darling.Tests/FleetCollectionHealthRecoveryLiveTests.cs, in the one test:_timescaledb_functions.stop_background_workers()right after the migrations, before seeding. This is how the other live tests handle it (about 130 use it).ANALYZE, assert zero compressedcollection_logchunks, so a future compression shows as a clear failure.idx_collection_log_prefix,idx_collection_log_watermarkpresent,idx_collection_log_timeabsent, no Seq Scan, and the Incremental Sort checks. Nothing was loosened.Test plan
compress_chunkforced on the seeded chunks, the test fails (Assert.Contains() Failure: Sub-string not found, the plan no longer reads the watermark index). Forcing all chunks gives a different first failing assert than CI's one-chunk case, but it is the same cause. I could not reproduce the random timing itself: the policy job did not land mid-test in any of the runs.FleetCollectionHealthRecoveryLiveTestswith the fix, 5 runs and 4 earlier runs against a throwaway PostgreSQL cluster withshared_preload_libraries = 'timescaledb,pg_stat_statements': Total 3, Failed 0, Skipped 0 each time.CollectorTrailingRuns*: no class has that name (Total 0). The only test namingCollectorTrailingRunsis in the file above.Considered, not added
compressed_names: not needed, and it would stop proving the statement reads through the watermark index.