Start no prefix flush after the stop deadline (closes #188) #190

Merged
clawbot merged 1 commits from issue-188-no-flush-after-stop-deadline into next 2026-10-27 13:13:04 +01:00
1 Commits
Author SHA1 Message Date
sneak 02c7b3a5f8 Start no prefix flush after the stop deadline (closes #188)
check / check (push) Waiting to run
When a write ran past the stop deadline, a full batch's wake-up or a tick
could wait beside Stop's context. The flush goroutine's select picked one of
them at random, so about half the time it wrote that batch after the
deadline. That was the intermittent failure of
TestPrefixHandlerSkipsItsLastWriteAfterTheStopDeadline. The flush goroutine
now takes a waiting stop first. A new test hands over a full batch while a
write is held; it fails about half its runs on the old code.

TestPrefixHandlerSkipsItsLastWriteAfterTheStopDeadline and
TestPrefixHandlerStopLogsTheTableChangesLeftUnwritten also failed when the
flush timer fired between two of their steps. Both now give the handler a
timer interval longer than the test.

Model: opus-5-5
2026-10-27 11:37:22 +00:00