kshitijk4poor
73f7fc2ca5
fix(state): a busy state.db is not a turn-lease wait
...
acquire_session_turn_lease treated a write-lock timeout like a lease that
another holder owns. It called on_wait, so the agent announced "Another
Hermes process is using this session", and it then slept a full poll
interval after the attempt had already spent its write patience.
A lock timeout now retries at once. The poll interval moves into the
retry's write patience, so the retry takes the lock as soon as it is free.
It reports through a new on_contended callback instead of on_wait. The
agent does not announce it, but it still reloads the transcript after
admission, because the busy writer may be the previous holder's final
flush. The failed-attempt cadence, and with it the lock-holder log line,
stays at about one per 1.5s.
With the first-turn lease from #126309 , this path also runs on first,
delegate, cron and one-shot turns.
Live test on a real state.db, with another connection holding the write
lock for 1.5s: before, admission took 2.11s and on_wait fired once;
after, 1.52s, with no on_wait and one on_contended.
2026-09-29 02:47:39 +05:30
..
2026-09-11 11:14:56 +05:30
2026-09-11 11:14:56 +05:30
2026-09-13 09:18:02 -07:00
2026-09-19 10:08:14 -07:00
2026-09-21 19:18:15 -04:00
2026-09-21 02:56:31 -07:00
2026-09-13 09:18:02 -07:00
2026-09-03 14:21:52 -07:00
2026-09-15 05:41:36 -07:00
2026-09-23 03:15:26 -07:00
2026-09-20 10:32:40 -07:00
2026-09-20 10:09:12 -07:00
2026-09-19 00:59:32 +05:30
2026-09-03 16:35:01 -07:00
2026-09-13 09:18:02 -07:00
2026-09-18 10:39:13 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-25 10:46:54 -05:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-20 00:14:10 -07:00
2026-09-23 15:26:34 -04:00
2026-09-27 20:49:04 +05:30
2026-09-18 19:06:52 -04:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-02 12:11:15 -05:00
2026-09-27 03:03:46 -05:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-21 06:09:56 -04:00
2026-09-23 16:59:09 -07:00
2026-09-13 09:18:02 -07:00
2026-09-18 10:38:41 -07:00
2026-09-23 03:15:26 -07:00
2026-09-18 17:26:10 -04:00
2026-09-18 10:38:41 -07:00
2026-09-13 09:18:02 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-15 12:33:45 -05:00
2026-09-13 09:18:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 10:34:54 -07:00
2026-09-23 07:02:44 -04:00
2026-09-28 04:34:30 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-23 07:02:44 -04:00
2026-09-03 13:46:50 -07:00
2026-09-23 07:02:44 -04:00
2026-09-21 20:29:18 -04:00
2026-09-15 04:12:13 -07:00
2026-08-15 02:20:13 -07:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-28 04:34:30 -07:00
2026-09-13 09:18:02 -07:00
2026-09-24 06:27:07 -05:00
2026-09-27 00:43:39 +05:30
2026-09-18 09:53:41 -07:00
2026-09-23 22:22:32 +05:30
2026-09-13 09:18:02 -07:00
2026-08-08 17:37:26 -07:00
2026-09-14 09:19:20 -07:00
2026-09-13 14:45:41 -07:00
2026-09-18 09:53:41 -07:00
2026-09-26 22:52:51 -05:00
2026-09-23 03:15:26 -07:00
2026-09-20 16:47:29 +05:30
2026-09-21 19:18:15 -04:00
2026-09-20 12:12:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-15 04:01:17 -07:00
2026-09-26 22:27:13 +05:30
2026-09-20 12:15:51 -07:00
2026-09-20 10:40:48 -07:00
2026-09-23 03:15:26 -07:00
2026-09-20 11:40:16 -07:00
2026-09-13 09:18:02 -07:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00
2026-09-15 03:51:07 -07:00
2026-09-13 09:18:02 -07:00
2026-08-15 00:31:37 -07:00
2026-09-03 15:07:39 -07:00
2026-08-05 13:50:26 +05:30
2026-09-13 09:18:02 -07:00
2026-08-04 12:32:27 -06:00
2026-09-29 02:47:39 +05:30
2026-09-13 09:18:02 -07:00
2026-09-11 09:36:04 -04:00
2026-09-26 20:40:40 -05:00
2026-09-23 03:15:26 -07:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-15 04:19:19 -07:00
2026-09-23 07:02:44 -04:00
2026-09-28 02:26:21 -07:00
2026-09-13 09:18:02 -07:00
2026-09-24 08:51:52 -04:00
2026-09-24 08:51:52 -04:00
2026-09-21 19:18:15 -04:00
2026-09-13 21:13:23 -07:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-19 04:49:23 -04:00
2026-09-13 09:18:02 -07:00
2026-09-13 09:18:02 -07:00
2026-09-14 08:50:29 -07:00
2026-09-18 19:06:52 -04:00
2026-09-23 07:02:44 -04:00
2026-09-13 09:18:02 -07:00
2026-09-23 08:20:01 -04:00
2026-09-23 08:20:01 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 10:17:46 -04:00
2026-09-18 10:30:20 -07:00
2026-09-23 15:26:34 -04:00
2026-09-19 03:14:20 +05:30
2026-09-11 06:23:23 -07:00
2026-09-23 10:34:54 -07:00
2026-09-26 11:32:10 -07:00
2026-09-18 19:06:52 -04:00
2026-09-13 09:18:02 -07:00
2026-09-28 02:26:21 -07:00
2026-09-23 11:35:07 -07:00
2026-09-23 03:15:26 -07:00
2026-09-13 09:18:02 -07:00