mirror of
https://github.com/pgsty/minio.git
synced 2026-09-05 18:16:16 +03:00
3598c4305d
The writer goroutine selects between the record channel and the error channel at random. When Evaluate had just queued a record and then reported an error, the error case could win first; it flushed only the staging buffer, so the queued record was dropped in the exit drain and the client saw the error without the records that preceded it. Stage whatever is queued before flushing and writing the error. The CVE-2026-39414 regression test asserted this contract and failed once under the race detector in CI; a new unit test exercises the ordering directly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QwirCh4nsrJCQp2WaXoVLK Signed-off-by: Feng Ruohang <rh@vonng.com>