]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] fuzzy_storage: peer-pipe write resume and shutdown drain
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 18 May 2026 09:40:40 +0000 (10:40 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 18 May 2026 10:07:56 +0000 (11:07 +0100)
commit32642c94b020e02c8d86e9ef89d4041501eb40cd
treefb6a8a3dea658eb75e0fecb6f31c3fd73b89b217
parentab5a6439d32fce140749803bc553a049de3c9a07
[Fix] fuzzy_storage: peer-pipe write resume and shutdown drain

fuzzy_peer_try_send retried short writes from byte 0 of the command
instead of resuming at the offset already sent, so a partial write
followed by a watcher-driven retry shoved garbage into the peer pipe.

Track the bytes sent on the request and resume from there.  Convert
the helper to a tri-state (DONE / AGAIN / FATAL) so the watcher can
keep firing on transient short writes and only stop+free on completion
or a hard error.

Also link pending requests into a list on the ctx so worker shutdown
can drain any whose write watcher never fires (e.g. on non-update
workers where the event loop has already broken out), instead of
leaking the up_req allocations.
src/fuzzy_storage.c
src/libserver/fuzzy_storage_internal.h