Skip to content

Add --kafka.producer.batch-min-messages collector flag#2371

Merged
yurishkuro merged 1 commit intojaegertracing:masterfrom
prymitive:kafka.producer.batch-min-messages
Aug 4, 2020
Merged

Add --kafka.producer.batch-min-messages collector flag#2371
yurishkuro merged 1 commit intojaegertracing:masterfrom
prymitive:kafka.producer.batch-min-messages

Conversation

@prymitive
Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Currently to control batch size when collector writes to kafka user can set --kafka.producer.batch-max-messages flag. This flag is used to configure kafka client library and set upper limit on the number of messages in a single batch, so the meaning of this flag is 'write up to N messages in a single batch'.
Current wording on --kafka.producer.batch-max-messages help text is 'Number of message to batch before sending records to Kafka.' which suggests that it's used to set minimal number of messages needed to send a batch to kafka.
For a user who wants to enforce a minimal batch size this means that there's currently no way of doing that, but at the same time there's a flag that is described as a way to do it, while actually doing something else.

Short description of the changes

This patch adds a --kafka.producer.batch-min-messages flag that allows configuring minimal batch size in the kafka client library and updates --kafka.producer.batch-max-messages flag description to be more clear on the effect it causes.

Currently to control batch size when collector writes to kafka user can set --kafka.producer.batch-max-messages flag. This flag is used to configure kafka client library and set upper limit on the number of messages in a single batch, so the meaning of this flag is 'write up to N messages in a single batch'.
Current wording on --kafka.producer.batch-max-messages help text is 'Number of message to batch before sending records to Kafka.' which suggests that it's used to set minimal number of messages needed to send a batch to kafka.
For a user who wants to enforce a minimal batch size this means that there's currently no way of doing that, but at the same time there's a flag that is described as a way to do it, while actually doing something else.

This patch adds a --kafka.producer.batch-min-messages flag that allows configuring minimal batch size in the kafka client library and updates --kafka.producer.batch-max-messages flag description to be more clear on the effect it causes.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
@prymitive prymitive marked this pull request as ready for review August 4, 2020 16:20
@prymitive prymitive requested a review from a team as a code owner August 4, 2020 16:20
@prymitive prymitive requested a review from pavolloffay August 4, 2020 16:20
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 4, 2020

Codecov Report

Merging #2371 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2371   +/-   ##
=======================================
  Coverage   95.61%   95.62%           
=======================================
  Files         206      206           
  Lines       10542    10548    +6     
=======================================
+ Hits        10080    10086    +6     
+ Misses        394      393    -1     
- Partials       68       69    +1     
Impacted Files Coverage Δ
plugin/storage/kafka/options.go 94.05% <100.00%> (+0.37%) ⬆️
plugin/storage/integration/integration.go 80.38% <0.00%> (-0.48%) ⬇️
plugin/storage/badger/spanstore/reader.go 96.79% <0.00%> (ø)
cmd/flags/admin.go 79.36% <0.00%> (+1.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9529bee...1217774. Read the comment docs.

@yurishkuro yurishkuro merged commit 3cff335 into jaegertracing:master Aug 4, 2020
@yurishkuro
Copy link
Copy Markdown
Member

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants