Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 20, 2026

Description

This PR addresses the issue where the database could become locked during concurrent operations (e.g., watcher running while searching). It enables Write-Ahead Logging (WAL) mode for SQLite and sets a busy timeout to handle lock contention more gracefully.

Changes

  • Enabled WAL journal mode.
  • Set a busy timeout of 5 seconds.
  • Set synchronous mode to NORMAL.

Verification

I reproduced the issue with a test script that simulated concurrent read/write operations, which failed with 'database is locked'. After applying the fix, the test passed successfully. Existing tests also pass.

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.

2 participants