fix(qwp): fixes a rare store-and-forward sender race that could silently drop a batch#41
Conversation
Avoid skipping a frame published after trySendOne observes the old segment tip but before it observes that the producer rotated to a new active segment. Re-read the current segment's published offset before advancing so the I/O loop sends any newly published tail frame instead of moving to the next segment.
[PR Coverage check]😍 pass : 7 / 7 (100.00%) file detail
|
Review: PR #41 —
|
jovfer
left a comment
There was a problem hiding this comment.
LGTM.
I can't say there are no other similar issues, but this particular change makes perfect sense.
Fixes a rare store-and-forward sender race that could silently drop a batch during high-throughput ingestion when a segment rotated while the sender was catching up.
implementation details for reviewers
Avoid skipping a frame published after trySendOne observes the old segment tip but before it observes that the producer rotated to a new active segment. Re-read the current segment's published offset before advancing so the I/O loop sends any newly published tail frame instead of moving to the next segment.