Skip to content

On-load config collectors also recapture daily, not just on connect (#3929) (#3930) - #4001

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/3929-3930-onload-daily-recapture
Sep 23, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
fix/3929-3930-onload-daily-recapture

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Closes #3929. Closes #3930.

Why

Five config collectors (server_config, database_config, database_scoped_config, trace_flags,
server_properties) run once per connect (FrequencyMinutes 0 in CollectorScheduleDefaults) and never
again while the connection stays healthy.

Erik ruled (both issues, 2026-09-23): re-capture the on-load collectors daily, in addition to on connect. That
fixes both.

What changes

Test plan

  • New regression tests proven to fail on the pre-fix shape: reverted TraceFlagsSql's bound (Darling) and
    reverted GetDueCollectorsForServer's substitution (Lite) one at a time, confirmed the new tests fail (3
    Darling, 3 Lite), restored the fix, confirmed green.
  • Darling.Tests targeted, against a private rig (PostgreSQL 18.6 + TimescaleDB 2.30.1): LatestValueLookback*
    (56, incl. 3 new), StoreConfigProviderTests (14, incl. 3 new), CollectorHealthClassifierTests,
    SweepPressureClassifierTests, DarlingSweepSchedulingTests, PgFactCollectorTests, StartupCommandTimeoutTests,
    AlertReadFailureSurfaceTests, DocCommentHygiene (248 total across that second batch) - all green.
  • Lite.Tests targeted: LatestValueLookbackTests (10), OnLoadRecaptureScheduleTests (6, new),
    DeltaFamilyScheduleBoundTests, CollectorHealthClassifierTests, SweepPressureClassifierTests,
    SharedCollectorDefaultsPinTests, CrossAppPresetValuePinTests, ConfigCollectorsDefinitionTests, ParitySource
    (89 total across that batch) - all green.
  • Full Lite.Tests suite once: 5160 total, 1 failure. The failure (StatusBarSizeReadLockTests, an
    unrelated write-lock-contention timing test) re-ran green alone - a pre-existing flake, not touched by this
    PR.
  • Full Darling.Tests suite once, against the same private rig: 12,941 total, 0 failures, 27 skipped (all
    gated on runtime/role-provisioning env vars this PR does not touch - DARLING_TEST_PGRUNTIME and friends).

Filed separately (parked, not in this PR)

Follow-up commit (coordinator)

  • TRACE_FLAGS reads the window's newest capture instead of each flag's newest row inside the window. A flag turned off while another stays on now drops out at the next daily capture instead of lingering up to two days. The all-flags-off case (a capture that writes no row) still falls back to the previous capture, bounded by the window. Both SKUs.
  • New tests: a live Darling test and a Lite unit test (flag on yesterday with another, gone this morning) that fail on the per-flag shape. Targeted runs: Darling 122/122 live, Lite 79/79 and then 9/9.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv

erikdarlingdata and others added 2 commits September 23, 2026 02:04
…3929) (#3930)

server_config, database_config, database_scoped_config, trace_flags and
server_properties ran once per connect and never again on a healthy
connection. A server connected 30+ days lost its only capture to the 30-day
retention purge (#3930), and TRACE_FLAGS took each flag's latest row across
all history with no time bound, so a flag turned off never got another row
to supersede its stale ON one (#3929).

CollectorScheduleDefaults.OnLoadRecaptureMinutes/EffectiveRecurringIntervalMinutes
is the one place "on-load" (frequency 0) becomes a daily periodic interval,
used by Darling's worker (the connect seed, reload recompute and
due-collector sweep) and Lite's ScheduleManager instead of special-casing
the five collectors by name. An operator's own override still wins. The
TRACE_FLAGS read is now bounded by the same on-load-aware lookback instead
of an unbounded partition, in both SKUs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv
…rops out at the next daily capture (#3929)

The bounded read kept each flag's own newest row inside the on-load
lookback, so a flag turned off while another stayed on lingered until its
last ON row left the roughly 48-hour window. Anchoring on the newest capture
inside the same window drops it at the next capture. A capture that finds
every flag off still writes no row and falls back to the one before it,
bounded by the window as before. Both SKUs; a new live test (Darling) and
unit test (Lite) fail on the per-flag shape.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdmA4ND1wLSqA91ax1m4xv
@erikdarlingdata
erikdarlingdata enabled auto-merge (squash) September 23, 2026 06:11
@erikdarlingdata
erikdarlingdata merged commit 145ae76 into dev Sep 23, 2026
17 of 18 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/3929-3930-onload-daily-recapture branch September 23, 2026 06:18
erikdarlingdata added a commit that referenced this pull request Sep 23, 2026
…ntries in their sections (#4080)

Adds 42 entries and 42 link refs (#3992, #3995, #3996, #3998, #4001, #4002, #4003, #4007, #4010, #4011, #4013, #4015, #4020, #4022, #4025, #4029, #4030, #4031, #4036, #4038, #4039, #4040, #4044, #4047, #4048, #4049, #4050, #4051, #4055, #4061, #4063, #4064, #4065, #4066, #4067, #4068, #4069, #4070, #4071, #4073, #4074, #4078). Each PR's entry was buffered, and this lands every entry whose PR was merged on origin/dev when it ran.

#3989 left 26 entries under bare 'Changed' and 'Fixed' lines above '### Added'. They move into '### Changed' and '### Fixed', below the new entries, and one blank line stays under [Unreleased].


Claude-Session: https://claude.ai/code/session_01Ua31ugERL5DmhFVRtf6keQ

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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