mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-22 10:14:15 +00:00
TestHoldPDSConcurrentRepoWritesAndSideTable failed in CI on 2026-09-14
with "database is locked" out of a carstore blocks INSERT, with the code
correct. It was the pds-level twin of the test 0ae9ca1 rewrote: four
record writers, two read loops and a tight autocommit side-table loop
hammered one file and asserted that no lock error surfaced, which on a
loaded runner is a statement about the disk. SQLite's busy handler is not
fair, so a writer can be starved past the 5 s busy_timeout while the side
loop keeps retaking the lock. It did not reproduce locally in 24 runs
under fsync-heavy load.
TestHoldPDSRepoWriteWaitsForSideTableLock tests the mechanism instead: a
second pool on the same file holds the write lock, a repomgr PutRecord is
shown to block rather than fail, to succeed once the lock is released,
and the repo and record are readable afterwards. The pool-level property
(busy_timeout on every connection of every pool, plus a control without
it) is already covered in pkg/hold/db; this keeps the repomgr path and
the post-contention readability check on top of it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPiKVQcxGYwxAbGnZv2tir