Skip to content

test: cbwin-e2e waits for the DB lock when it renames shares - #100

Merged
rsantacroce merged 1 commit into
mainfrom
fix/cbwin-e2e-sqlite-busy
Oct 12, 2026
Merged

rsantacroce merged 1 commit into
mainfrom
fix/cbwin-e2e-sqlite-busy

Conversation

@rsantacroce

Copy link
Copy Markdown
Collaborator

The cbwin-e2e stage "a pool that cannot measure its window publishes NO job" renames shares from the sqlite3 CLI while the pool has the DB open and retries its window query on every poll. The CLI has no busy timeout by default, so a rename that lands while the pool holds a lock fails at once with Error: stepping, database is locked (5) and the job exits 5.

The same flake failed:

Fix: -cmd ".timeout 10000" on all four ALTER TABLE renames in tests/test_pplns_coinbase_regtest.sh. Test-only; no pool code changes.

Checked locally: while another connection holds BEGIN EXCLUSIVE for 2 s, the plain CLI rename exits 5 with "database is locked" and the .timeout version waits and succeeds.

The 'cannot measure its window' stage renames the shares table from the
sqlite3 CLI while the pool holds the DB open and retries its window
query. The CLI has no busy timeout, so a rename that lands during the
pool's lock fails at once with 'database is locked' (exit 5). It failed
main on 2026-10-02 and PR #98 on 2026-10-12. Give all four renames a 10s
busy timeout.
@rsantacroce
rsantacroce merged commit 5f9ac48 into main Oct 12, 2026
9 checks passed
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