Skip to content

PayloadDimensionLiveTests pre-filter test asserts a cluster-wide WAL delta, so parallel live classes fail it #4354

Description

@erikdarlingdata

Title

PayloadDimensionLiveTests pre-filter test asserts a cluster-wide WAL delta, so parallel live classes fail it

Body

Darling/Darling.Tests/PayloadDimensionLiveTests.cs, test
PreFilter_SkipsLockingFreshRows_ButStillRefreshesStaleOnes_AndInsertsNewDigests (added by #4288,
commit dfb4fbd, Sep 25), fails intermittently in CI's "Darling PG tests" shard 2 on PRs whose
diffs don't touch it:

PayloadDimensionLiveTests.cs:831: expected a near-zero WAL delta for an all-fresh batch, saw 39592 bytes

Seen on:

It blocks unrelated, otherwise-green PRs from merging.

Mechanism (read from code, not reproduced)

The test asserts pg_wal_lsn_diff(pg_current_wal_lsn(), before) < 1024. pg_current_wal_lsn() is
CLUSTER-wide, not scoped to the relation the test writes to. The class carries
[Collection("live-postgres")], which serializes it only against other classes in that same
xunit collection. It does not serialize against the ~39 "own-store" classes (the #1776 own-store exemption documented in LivePostgresCollectionHygieneTests.cs) that mint their own
scratch databases through ScratchPostgres and run in parallel with live-postgres classes on
the SAME Postgres cluster. Those classes' CREATE DATABASE/DDL/DML, plus ordinary autovacuum and
checkpoint activity, all write WAL on the shared cluster. Any of that traffic landing inside the
test's measurement window pushes the delta past the 1 KB bar even though the test's own
transaction touched nothing.

The own-store exemption's isolation guarantee is about rows and relations, not cluster-wide state
— LivePostgresCollectionHygieneTests.cs's comment describing the exemption should say so
explicitly.

Activity

  1. erikdarlingdata commented on Sep 25, 2026

    @erikdarlingdata
    OwnerAuthor

    Fixed by #4356, merged to dev (ddf6d1e).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions