Files
docker-agent/pkg/memory/database/sqlite
David Gageot 844268da83 fix(memory): open sqlite db under file lock to avoid SQLITE_BUSY races
In ensureDB, OpenDB was called before acquiring the file lock; the first
open of a fresh database converts it to WAL mode which needs an exclusive
lock not covered by busy_timeout, so concurrent first-opens could race.
Moving lock acquisition before OpenDB ensures open + WAL conversion +
schema migration all run under the lock.

Assisted-By: Claude
2026-07-08 15:56:13 +02:00
..