kshitijk4poor
c8173e0387
fix(state): sweep turn-lease rows left behind by dead holders
...
A turn that dies without releasing (SIGKILL, crash, parent killed with
children in flight) leaves its session_turn_leases row forever when
nobody resumes that conversation. Acquisition only reclaims the row of
the conversation it is acquiring.
Each acquisition now deletes rows that expired more than 24h ago, in the
same write transaction, through the existing expires_at index (which had
no reader). Recent expiries are kept, so a live owner with a starved
refresher can still renew its own row on its next write.
On a copy of a real state.db lease table, one acquisition removed the four
rows expired 16 to 25 days ago and kept the row expired 15.6h ago and the
live rows.
2026-09-28 19:33:44 +05:30
..
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-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-18 10:39:13 -07:00
2026-09-25 10:46:54 -05:00
2026-09-23 03:15:26 -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-27 03:03:46 -05:00
2026-09-21 06:09:56 -04:00
2026-09-23 16:59:09 -07:00
2026-09-23 03:15:26 -07:00
2026-09-18 17:26:10 -04:00
2026-09-23 07:02:44 -04:00
2026-09-23 03:15:26 -07:00
2026-09-23 03:15:26 -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-23 07:02:44 -04:00
2026-09-21 20:29:18 -04:00
2026-09-23 03:15:26 -07:00
2026-09-28 04:34:30 -07:00
2026-09-24 06:27:07 -05:00
2026-09-27 00:43:39 +05:30
2026-09-23 22:22:32 +05:30
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-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-23 03:15:26 -07:00
2026-09-23 03:15:26 -07:00
2026-09-28 19:33:44 +05:30
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-23 07:02:44 -04:00
2026-09-28 02:26:21 -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-23 07:02:44 -04:00
2026-09-19 04:49:23 -04:00
2026-09-18 19:06:52 -04:00
2026-09-23 07:02:44 -04: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-23 15:26:34 -04:00
2026-09-19 03:14:20 +05:30
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-28 02:26:21 -07:00
2026-09-23 11:35:07 -07:00
2026-09-23 03:15:26 -07:00