Teknium
c9b71ebaf7
fix(dashboard): startup schema reconcile opens state.db read-only first
...
The dashboard's `_eager_reconcile_own_session_db` did an unconditional
writable `acquire()` at every startup. When the gateway shares that
state.db the dashboard became a second long-lived writable SessionDB
owner: a close-time WAL checkpoint plus a possible FTS rebuild in
`_init_fts`, the two-writer vector behind the corruption reports in
#107688 and #100896 ("5 live SessionDB handles" precursor, gateway +
dashboard both holding the WAL).
Route the startup reconcile through `_open_session_db_at_path(...,
read_only=True)`, which already bootstraps a missing store and heals a
stale/malformed schema through exactly ONE writable open before
reopening read-only. A healthy store now gets zero writable opens from
the dashboard while the #79531/#80037 "bring schema current before the
first poll" contract is kept (existing heal test unchanged).
Live repro (healthy store, count writable SessionDB.__init__ calls from
the startup worker): before=1 after=0.
Reported-by: #107688 , #100896 (@kokhlo diagnosis)
Refs #107688 #100896
2026-09-11 06:21:48 -07:00
..
2026-09-07 06:12:41 -07:00
2026-09-10 14:56:55 -04:00
2026-09-11 11:08:11 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-09 23:40:59 +05:30
2026-09-10 14:56:55 -04:00
2026-09-09 02:34:59 -07:00
2026-09-07 08:06:11 -07:00
2026-09-09 12:33:15 -07:00
2026-09-07 08:06:48 -07:00
2026-09-09 03:33:14 -07:00
2026-09-11 15:30:09 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 01:40:43 -04:00
2026-09-09 21:16:48 +05:30
2026-09-11 01:40:43 -04:00
2026-09-07 06:12:41 -07:00
2026-09-09 10:14:58 -07:00
2026-09-07 21:43:54 +05:30
2026-09-11 19:04:06 +10:00
2026-09-09 02:36:00 -07:00
2026-09-09 02:36:00 -07:00
2026-09-11 01:40:43 -04:00
2026-09-09 04:32:13 -07:00
2026-09-09 09:19:54 -07:00
2026-09-09 21:35:08 -04:00
2026-09-11 19:04:06 +10:00
2026-09-09 10:54:34 -07:00
2026-09-10 01:25:45 -07:00
2026-09-09 10:28:52 -07:00
2026-09-11 06:21:48 -07:00
2026-09-06 05:41:46 -07:00
2026-09-06 09:09:41 -07:00
2026-09-06 09:09:41 -07:00
2026-09-08 22:35:39 +05:30
2026-09-08 22:35:39 +05:30
2026-09-10 02:48:21 -07:00
2026-09-09 10:42:32 -07:00
2026-09-08 02:28:21 +05:30
2026-09-07 00:51:41 -07:00
2026-09-06 23:08:45 -07:00
2026-09-07 04:46:37 -07:00
2026-09-05 17:20:30 -04:00
2026-09-09 12:18:58 -07:00
2026-09-07 14:16:57 -07:00
2026-09-07 07:09:59 -07:00
2026-09-07 07:09:59 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 09:21:29 -07:00
2026-09-09 09:45:13 -07:00
2026-09-07 06:04:06 -07:00
2026-09-07 07:09:59 -07:00
2026-09-07 04:55:17 -07:00
2026-09-11 01:40:43 -04:00
2026-09-11 01:40:43 -04:00
2026-09-11 01:40:43 -04:00
2026-09-07 08:23:08 -07:00
2026-09-11 03:45:33 +05:30
2026-09-10 03:58:37 -07:00
2026-09-05 18:23:03 -04:00
2026-09-10 01:00:19 -07:00
2026-09-10 18:12:39 -07:00
2026-09-09 02:36:00 -07:00
2026-09-10 04:22:38 -07:00
2026-09-10 03:58:37 -07:00
2026-09-10 03:58:37 -07:00
2026-09-10 03:58:37 -07:00
2026-09-10 03:58:37 -07:00
2026-09-10 09:11:00 -07:00
2026-09-10 03:58:37 -07:00
2026-09-09 02:36:00 -07:00
2026-09-10 01:00:19 -07:00
2026-09-06 05:45:44 -07:00
2026-09-10 18:11:25 -07:00
2026-09-09 21:12:22 +05:30
2026-09-10 18:11:25 -07:00
2026-09-09 12:41:07 +05:30
2026-09-07 21:43:54 +05:30
2026-09-10 18:15:54 -07:00
2026-09-10 10:27:07 -07:00
2026-09-07 06:10:49 -07:00
2026-09-07 21:22:49 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-10 01:00:19 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-10 01:00:19 -07:00
2026-09-07 13:11:36 +05:30
2026-09-07 22:47:33 +05:30
2026-09-06 05:34:01 -07:00
2026-09-09 21:11:56 +05:30
2026-09-09 21:11:56 +05:30
2026-09-09 04:27:24 -07:00
2026-09-09 11:51:00 -07:00
2026-09-11 03:45:33 +05:30
2026-09-07 01:37:43 -07:00
2026-09-10 18:11:25 -07:00
2026-09-06 20:47:52 +05:30
2026-09-09 09:20:12 -07:00
2026-09-10 18:13:16 -07:00
2026-09-11 13:03:40 +05:30
2026-09-07 04:56:38 -07:00
2026-09-11 13:08:19 +05:30
2026-09-09 18:28:57 +05:30
2026-09-09 18:28:57 +05:30
2026-09-09 04:32:13 -07:00
2026-09-07 06:10:54 -07:00
2026-09-11 19:04:06 +10:00
2026-09-09 03:32:58 -07:00
2026-09-11 02:06:32 -07:00
2026-09-09 11:27:36 +10:00
2026-09-07 22:25:12 -07:00
2026-09-07 22:25:12 -07:00
2026-09-07 05:59:43 -07:00
2026-09-07 06:08:37 -07:00
2026-09-09 10:33:00 -07:00
2026-09-09 09:19:54 -07:00
2026-09-08 22:35:39 +05:30
2026-09-09 10:26:06 -07:00
2026-09-06 23:34:20 +05:30
2026-09-10 18:15:54 -07:00
2026-09-10 18:15:54 -07:00
2026-09-11 02:06:32 -07:00
2026-09-07 06:10:49 -07:00
2026-09-06 14:53:33 +05:30
2026-09-07 05:56:50 -07:00
2026-09-08 03:06:30 -07:00
2026-09-07 05:56:50 -07:00
2026-09-07 08:20:46 -07:00
2026-09-06 20:47:52 +05:30
2026-09-07 08:20:09 -07:00
2026-09-07 06:12:41 -07:00
2026-09-09 09:19:54 -07:00
2026-09-11 03:45:33 +05:30
2026-09-09 04:38:01 -07:00
2026-09-09 21:16:40 +05:30
2026-09-09 03:33:06 -07:00
2026-09-09 10:58:16 -07:00
2026-09-09 12:17:13 +05:30
2026-09-07 07:11:36 -07:00
2026-09-07 05:56:33 -07:00
2026-09-10 02:48:21 -07:00
2026-09-09 04:32:13 -07:00
2026-09-11 06:21:48 -07:00
2026-09-11 19:04:06 +10:00
2026-09-11 19:04:06 +10:00