Skip to content

Payload-dimension pre-filter test no longer asserts a cluster-wide WAL delta (#4354) - #4356

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/4354-payload-dimension-wal-flake
Sep 25, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
fix/4354-payload-dimension-wal-flake

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Closes #4354.

Why

PayloadDimensionLiveTests.PreFilter_SkipsLockingFreshRows_ButStillRefreshesStaleOnes_AndInsertsNewDigests
(added by #4288) asserted a near-zero pg_wal_lsn_diff(pg_current_wal_lsn(), before) for an
all-fresh batch. pg_current_wal_lsn() is cluster-wide, not scoped to the relation the test
writes. The class is [Collection("live-postgres")], which only serializes against other
live-postgres classes — it does not serialize against the ~39 "own-store" classes (the #1776 own-store exemption) that mint scratch databases on the SAME cluster and run in parallel. Any of
that traffic (plus autovacuum/checkpoints) landing inside the test's measurement window pushes the
delta past the 1 KB bar even when the test's own transaction touched nothing. Seen on PR #4347
(run 36186310095, attempt 2) and PR #4353 (run 36198090347), both unrelated to this test.

What changes

Test-only. No production code changes.

  • Dropped the pg_wal_lsn_diff assertion and its two now-unused helper locals
    (CurrentWalLsnAsync, WalBytesSinceAsync) from
    PreFilter_SkipsLockingFreshRows_ButStillRefreshesStaleOnes_AndInsertsNewDigests. The test's
    existing xmax <> 0 and last_seen checks already pin "no lock taken, no row touched" directly
    against the rows this test wrote — they have no exposure to unrelated cluster WAL traffic, so
    the WAL assertion was redundant as well as flaky. The summary doc comment on the test now
    explains why the WAL check was there and why it was removed.
  • LivePostgresCollectionHygieneTests.cs's doc comment on the own-store exemption now says
    explicitly that the exemption's isolation is scoped to rows/relations, not cluster-wide state
    such as WAL position, which every session on the same server moves.

Test plan

For the coordinator

  • The harness used a bundled TimescaleDB 2.30.1-pg18 image, matching the shipped runtime pin per
    prior lessons on this repo, but is otherwise a throwaway rig (not CI, not the fetch-pg-runtime.ps1
    path) — treat the red/green numbers as a code-level proof of the assertion's behavior, not a CI
    run.
  • No other test in the touched files was changed.

…pre-filter test (#4354)

pg_current_wal_lsn() is cluster-wide, not scoped to the rows the test
writes. The ~39 own-store classes that mint scratch databases on the
same Postgres cluster run in parallel with this test's live-postgres
collection and can push the WAL delta past the 1 KB bar with traffic
that never touches this test's rows. The xmax and last_seen checks
already pin "no lock taken, no row touched" directly against the
rows this test wrote, so the WAL assertion was redundant as well as
flaky. Also notes the own-store exemption's isolation is scoped to
rows/relations, not cluster-wide state.
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review September 25, 2026 23:27
@erikdarlingdata
erikdarlingdata merged commit ddf6d1e into dev Sep 25, 2026
15 of 16 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/4354-payload-dimension-wal-flake branch September 25, 2026 23:27
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