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.
Second stand-alone chunk extracted from #544, (first chunk: #549). This uses the
produceSet
struct in the aggregator as well, and moves thewouldOverflow
andreadyToFlush
methods to methods on theproduceSet
.Knock-on effects:
more precise overflow checking (see the compressed-message-batch-size-limit
case in
wouldOverflow
which has changed) which will be more efficient inhigh-volume scenarios
now rejected from the aggregator and don't count towards batch size
which need retrying due to the state machine; for simplicity I add them to a
second produceSet still, which means all messages get encoded twice; this is
a definite major performance regression which will go away again in part 3
of this refactor
@wvanbergen