chore: sync main-4.1 (4.1.11) into main - #120
Merged
Merged
Conversation
Since 4.1.1, the linger delay was applied only before enqueue, and only when replayq is writing to disk (to batch disk writes). Memory-mode producers therefore sent each arrival immediately, resulting in many small produce requests under steady low-to-moderate load. Now, when it is time to form a new produce request and the queue holds less than min(max_linger_bytes, max_batch_bytes) bytes, the producer waits up to max_linger_ms for more calls to accumulate before popping the queue. The wait ends as soon as a full batch worth of bytes is queued, so under sustained load full batches are sent with no added latency; only under-sized (tail) batches are delayed, bounded by max_linger_ms. The default max_linger_ms = 0 keeps the previous behavior.
…ry-mode fix: apply max_linger_ms to memory-mode queues (linger before pop)
# Conflicts: # changelog.md # src/wolff_producer.erl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge
main-4.1intomain, bringing the 4.1.11 release (memory-mode pop-linger, #119) forward.Conflict resolutions
src/wolff_producer.erl:maybe_send_to_kafka— combined both sides: the function keeps main'sdrop_expired_head/1call (frommax_batch_age, feat: add max_batch_age to drop stale batches instead of retrying #117) and gains theLingerargument from 4.1.11. Expired batches are shed before the pop-linger gate, so the gate'sreplayq:bytes/1threshold check never counts already-expired data.changelog.md: kept both entries — unreleased4.2.0on top, released4.1.11below it.Everything else auto-merged; the linger gate call-site set is unchanged (no new
maybe_send_to_kafkacallers were introduced by #117/#118).Verified on the merge result: 67 eunit tests (both branches' suites), 11 CT cases, dialyzer, xref — all pass.