Repository navigation
The collection-health fixture stops its scratch database's TimescaleDB scheduler, so no policy run the test did not make can land (#3986) - #3987
Merged
erikdarlingdata merged 1 commit intoSep 23, 2026
Conversation
…B scheduler, so no policy run the test did not make can land (#3986) collection_health_hourly's policy has no initial_start, so the scheduler launched its first run the moment the ensure path committed it, before the fixture could park it. #3982 retried the resulting 55P03 collision, but a launch landing while the test was still planting moved the watermark under rows a pre-run assertion then missed (OutageHole: 342 of 360). The fixture now calls _timescaledb_functions.stop_background_workers() before the ensure path and asserts no scheduler remains for the scratch database. Measured on TimescaleDB 2.30.1: it stops only that database's scheduler, the scheduler stays down, a no-initial_start policy never runs on its own (a control database's ran within 15 s), and CALL run_job still works. RunPolicyAsync's retry is gone with the race it papered over. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv
erikdarlingdata
enabled auto-merge (squash)
September 23, 2026 04:01
erikdarlingdata
deleted the
fix/3986-collection-health-fixture-scheduler
branch
September 23, 2026 04:08
erikdarlingdata
added a commit
that referenced
this pull request
Sep 23, 2026
… it was measured on: 2.28.1, holding on CI's 2.30.1 (#3988) #3987 said the scheduler-stop behavior was measured on 2.30.1. The rig was this machine's stale pg-runtime.zip, TimescaleDB 2.28.1; CI's darling-pg job ran the fixture on the pinned 2.30.1 runtime and passed. Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 23, 2026
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.
Closes #3986.
Why
collection_health_hourly's refresh policy has noinitial_start, so TimescaleDB's scheduler launches its first run as soon as the product's ensure path commits it.CollectionHealthAggregateTests.OpenStoreAsynccould park the job only after that. A launch that landed first either:CALL run_job(55P03, The start-up hole scan probes each bucket once instead of joining the whole materialization and the whole source table (#3933) #3972's CI run), which Chunk-exclusion tests count a bitmap plan's chunks once, and the collection-health policy run waits out a launch that beat the park #3982 retried; orOutageHole_…saw 342 of 360. The retry could not help with that.What changes
OpenStoreAsynccalls_timescaledb_functions.stop_background_workers()on the scratch database before the ensure path runs, then asserts that no TimescaleDB scheduler remains for that database. The park stays as a second guard.RunPolicyAsyncloses Chunk-exclusion tests count a bitmap plan's chunks once, and the collection-health policy run waits out a launch that beat the park #3982's 55P03 retry. With no background run possible, it was dead code, and its comment claimed more than it covered.FreshStoreWatermarkTestsshares the fixture and gets the same guarantee.Test plan
pg-runtime.zip; CI's darling-pg job then ran the fixture on the pinned 2.30.1 runtime and passed, and The collection-health fixture's comment names the TimescaleDB version it was measured on (#3986 follow-up) #3988 corrects the code comment), using two probe databases, each with a CAGG and a policy with noinitial_start:stop_background_workers()stopped only its own database's scheduler; the other database's stayed up.total_runsstayed null and 0 buckets were materialized, andCALL run_jobthen materialized 47.CollectionHealthAggregateTests+FreshStoreWatermarkTestslive on that rig, run five times in a row: 15/15 each time.darling-pgfull run.Test-only change, so no CHANGELOG entry.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv