mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-06 15:07:58 +00:00
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