JVM sqlite driver: SQLITE_BUSY surfaces as a crash on concurrent writers — set busy_timeout #54

Closed
opened 2026-08-06 23:22:34 +02:00 by thecrealm · 0 comments
Owner

Found by the #47 demo e2e: PersistentConnectionDriver (D25) gives each thread its own connection to the same file with busy_timeout=0, so a public-op write racing the reducer's transaction throws SQLITE_BUSY (seen: SendQueue.send enqueue racing sync commit). Public operations must not crash on internal lock contention (CR-17 spirit). Fix: PRAGMA busy_timeout on each fresh connection in the JVM driver; Android's framework driver already serializes writes. Concurrency hammer test in katrix-store-sqlite.

Found by the #47 demo e2e: PersistentConnectionDriver (D25) gives each thread its own connection to the same file with busy_timeout=0, so a public-op write racing the reducer's transaction throws SQLITE_BUSY (seen: SendQueue.send enqueue racing sync commit). Public operations must not crash on internal lock contention (CR-17 spirit). Fix: PRAGMA busy_timeout on each fresh connection in the JVM driver; Android's framework driver already serializes writes. Concurrency hammer test in katrix-store-sqlite.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thecrealm/katrix#54
No description provided.