Skip to content

Probe the SQLite write lock in the interrupt sweep instead of timing the next send - #17

Merged
Piergiuseppe merged 1 commit into
mainfrom
fix/sweep-test-measures-the-lock-not-the-disk
Nov 15, 2026
Merged

Piergiuseppe merged 1 commit into
mainfrom
fix/sweep-test-measures-the-lock-not-the-disk

Conversation

@Piergiuseppe

Copy link
Copy Markdown
Owner

test_an_interrupt_anywhere_in_a_transaction_leaves_nothing_open failed once on main: after one of its ~3100 interrupts the next send took 3.6 s against a limit of 1 s.

A probe on a Linux box caught 7 slow sends in 117 runs. In every one the SQLite thread was inside the COMMIT of that send, at a different interrupt point each time, with the loop and the control thread idle: the test was timing the disk, not a lock left behind.

The test now asks SQLite directly, from a connection of its own and without waiting, whether the write lock is free after each interrupt and again after the send. Stricter than the timing, and independent of how fast the disk is.

…d of timing the next send, which measured how fast the disk took a commit
@Piergiuseppe Piergiuseppe self-assigned this Nov 15, 2026
@Piergiuseppe
Piergiuseppe merged commit a97200d into main Nov 15, 2026
14 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