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.
Title
PayloadDimensionLiveTests pre-filter test asserts a cluster-wide WAL delta, so parallel live classes fail it
Body
Darling/Darling.Tests/PayloadDimensionLiveTests.cs, testPreFilter_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:
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()isCLUSTER-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 samexunit collection. It does not serialize against the ~39 "own-store" classes (the
#1776 own-storeexemption documented inLivePostgresCollectionHygieneTests.cs) that mint their ownscratch databases through
ScratchPostgresand run in parallel withlive-postgresclasses onthe SAME Postgres cluster. Those classes'
CREATE DATABASE/DDL/DML, plus ordinary autovacuum andcheckpoint 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 soexplicitly.