Sqlite: count uncheckpointed WAL frames for admission and observe automatic rollback #47

Closed
opened 2026-12-03 10:24:27 +00:00 by faumaray · 1 comment
Owner

Context: Forge's metadata store builds on Void::Sqlite and hit two wrapper limitations during M03.

G6: WAL admission is based on file size rather than un-checkpointed frames, so a large but already-checkpointed WAL can still block writes. Please count un-checkpointed frames (or expose that metric) for admission decisions.

G7: after an automatic rollback (for example SQLITE_FULL or an interrupt inside an explicit transaction), the wrapper does not expose that the transaction ended; callers must poll sqlite3_get_autocommit themselves. Please surface the transaction state change (or make Transaction report RolledBack) so callers cannot mistake it for an open transaction.

Tests/gate: a pinned-reader WAL scenario for G6; SQLITE_FULL/interrupt during a statement for G7. Forge has local workarounds (truncate-checkpoint recovery, autocommit poisoning) but would prefer the wrapper to own this.

Context: Forge's metadata store builds on Void::Sqlite and hit two wrapper limitations during M03. G6: WAL admission is based on file size rather than un-checkpointed frames, so a large but already-checkpointed WAL can still block writes. Please count un-checkpointed frames (or expose that metric) for admission decisions. G7: after an automatic rollback (for example SQLITE_FULL or an interrupt inside an explicit transaction), the wrapper does not expose that the transaction ended; callers must poll sqlite3_get_autocommit themselves. Please surface the transaction state change (or make Transaction report RolledBack) so callers cannot mistake it for an open transaction. Tests/gate: a pinned-reader WAL scenario for G6; SQLITE_FULL/interrupt during a statement for G7. Forge has local workarounds (truncate-checkpoint recovery, autocommit poisoning) but would prefer the wrapper to own this.
Author
Owner

Implemented on branch issue-47-sqlite-wal (commit a408825): WAL admission now uses un-checkpointed frames and Transaction reports automatic rollbacks (RolledBack) after SQLITE_FULL/interrupt. Merged into main. Pinned-reader WAL and auto-rollback tests pass. Closing as done.

Implemented on branch `issue-47-sqlite-wal` (commit `a408825`): WAL admission now uses un-checkpointed frames and Transaction reports automatic rollbacks (`RolledBack`) after SQLITE_FULL/interrupt. Merged into `main`. Pinned-reader WAL and auto-rollback tests pass. Closing as done.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#47