Conversation
A Group Chat Stop can open state.db while another thread is finishing an atomic config publication. Preserve an initialized database in its observed WAL or DELETE mode instead of waiting for the config writer; never select a new mode from stale settings. Cold, unknown and strict-WAL initialization keep the normal policy path. Avoid the config/module cold-import lock inversion and retain the existing deduplicated WAL-reset warning. The four-step reviewed source lineage is preserved at14bb260e2c,9fcbe65e66,0a03d0f3b6,61eb4625e6. Two independent final reviews clear the product and runtime-independent tests.
SummaryAvoids stalling initialized databases on a held config lock: when Findings
VerdictCorrect lock-contention design with thorough concurrency tests. No blocking issues. |
Preserve the original two-file fix and authored history unchanged. 79 focused SQLite/config tests pass without retries. The unchanged regression still reproduces five config-lock timeouts on the new base. This removes the journal-policy wait, not every configuration-dependent SessionDB opening step. No live Stop or full-release acceptance claimed.
|
Superseded by the same two-file implementation and regression test in open runtime PR #106742 (commit e06d714). The source and replayed commit have identical file blobs, and that commit remains reachable from #106742 at 485d5f6. Closing this duplicate review entry as incorporated in that open PR—not merged into main or deployed. The source branch and history are retained; if #106742 drops the fix, revisit this closure. |
Avoid unnecessary database waits while settings are saved
While settings are being saved, opening an established Kanban database can wait unnecessarily just to check its journal policy. This bounded SQLite/config fix uses the safely observed mode for an initialized database instead of waiting for the full config loader. Found during #97681 work, it changes no execution ownership and does not make every database-opening or Stop path nonblocking.
Behavior and limits
This does not make all
SessionDBopening or read-pool expansion independent of config writes. Those paths also callapply_database_pragmas(), whose separate config load can still wait. That pre-existing boundary is unchanged.No timeout, retry loop, config key, new SQLite
BUSYclassification or live journal downgrade is introduced.Verification
Refreshed by a normal merge onto main
b9271bcb34e1. The original two-file patch is byte-for-byte unchanged.b9271bcb34e1134152f492ec4979215765f769ebc60391f686c7The earlier three independent probes remain historical evidence from the previous refresh; they are not new tests added to these totals. No full-repository, live Stop, platform or release acceptance is claimed. GitHub CI remains a separate gate.
Exact source, command and attribution
Current head: 029ca5a064a0. Two-file comparison against the tested main.
Run with disposable state:
The sibling test paths follow main's test-directory reorganization. Coverage retains old rows and journal modes, deferred upgrades, strict initialization, concurrent readers, cold imports and warning behavior. Both changed files remain below 2K lines.
Original published head
22131bb68787and the previous refresh43ea3c841fdcremain ancestors. No source history was rewritten. #98073 carries an authored equivalent: land or salvage the behavior once with attribution. #101384 concerns a separate concurrent WAL-transition race; its retry logic is neither imported nor duplicated.