kshitijk4poor
927633272f
fix: claim busy before clearing queue in _stop_token_writer drain
...
Follow-up to PR #64171 . The writer loop and flush_token_counts'
caller-drain both set _token_writer_busy BEFORE popping the queue —
that ordering is what makes flush's lock-free fast path (reads queue
then busy, no cond held) sound. _stop_token_writer's leftover drain did
it backwards (clear queue, then set busy), leaving a few-bytecode window
where a concurrent flush could observe 'empty and idle' and return True
with the popped batch still unapplied. Shutdown-only staleness, no data
loss — but the protocol now matches at all three drain sites.
Test: concurrent flush during a stop-drain mid-apply must time out
(False), never report drained.
2026-07-28 18:47:54 +05:30
..
2026-07-25 18:06:32 -07:00
2026-07-22 12:10:58 -05:00
2026-07-28 18:47:54 +05:30
2026-07-23 05:45:17 +00:00
2026-07-28 17:52:21 +05:30
2026-07-26 03:38:23 -05:00
2026-07-26 16:52:25 +10:00
2026-07-28 17:52:21 +05:30
2026-07-27 19:19:01 +05:30
2026-07-22 20:55:51 -07:00
2026-07-28 18:08:24 +05:30
2026-07-28 17:52:21 +05:30
2026-07-17 06:53:38 -07:00
2026-07-24 07:53:12 -07:00
2026-07-24 13:00:53 +05:30
2026-07-27 22:28:08 -04:00
2026-07-25 22:46:35 -07:00
2026-07-28 18:47:54 +05:30
2026-07-27 22:28:08 -04:00
2026-07-22 03:20:45 -07:00
2026-07-26 20:59:26 -07:00
2026-07-24 16:00:34 -07:00
2026-07-28 04:24:50 -05:00
2026-07-28 04:12:48 -05:00
2026-07-26 16:01:32 -07:00
2026-07-22 04:40:07 -07:00
2026-07-23 07:24:46 -07:00
2026-07-22 04:39:28 -07:00
2026-07-25 07:17:52 -07:00
2026-07-23 11:44:43 -07:00
2026-07-14 03:58:54 +05:30
2026-07-15 00:10:31 -07:00
2026-07-22 03:20:25 -07:00
2026-07-22 04:39:17 -07:00
2026-07-22 10:35:04 -07:00
2026-07-20 05:39:09 -07:00
2026-07-24 17:10:39 -07:00
2026-07-18 00:34:54 -04:00
2026-07-25 22:47:07 -07:00
2026-07-27 17:27:38 -07:00
2026-07-25 21:44:43 -07:00
2026-07-28 00:15:00 +05:00
2026-07-16 12:48:48 -07:00
2026-07-17 20:55:24 +00:00
2026-07-18 19:18:03 +05:30
2026-07-26 19:30:32 -07:00
2026-07-18 18:40:59 -04:00
2026-07-26 16:06:50 -05:00
2026-07-24 09:49:00 -07:00
2026-07-24 09:49:00 -07:00
2026-07-24 09:49:00 -07:00
2026-07-24 21:20:52 -05:00
2026-07-21 12:15:46 +05:30
2026-07-27 22:28:08 -04:00
2026-07-22 03:19:32 -07:00
2026-07-22 16:51:01 -04:00
2026-07-26 19:29:07 -07:00
2026-07-27 22:28:08 -04:00
2026-07-16 19:48:47 -04:00
2026-07-25 07:09:22 -07:00
2026-07-22 07:56:47 -07:00
2026-07-26 02:58:20 -05:00
2026-07-12 05:07:52 -04:00
2026-07-22 21:14:44 -07:00
2026-07-18 04:15:13 -07:00
2026-07-25 21:44:43 -07:00
2026-07-25 21:44:43 -07:00
2026-07-22 04:42:50 -07:00
2026-07-14 21:25:44 -07:00
2026-07-18 01:11:03 -07:00
2026-07-23 21:06:47 -07:00
2026-07-23 16:21:03 -07:00
2026-07-21 12:43:27 -07:00
2026-07-28 01:48:08 -05:00
2026-07-28 04:06:32 -05:00
2026-07-26 14:14:03 -07:00
2026-07-15 04:55:46 -07:00
2026-07-16 15:23:32 -04:00
2026-07-16 14:43:14 +02:00
2026-07-24 11:45:57 -07:00
2026-07-08 08:05:45 -07:00
2026-07-24 23:06:05 -07:00