Skip to content

Conversation

@iblancasa
Copy link
Contributor

Link to tracking issue

Fixes #14435

…s unset

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa requested a review from a team as a code owner January 16, 2026 14:50
@iblancasa iblancasa requested a review from axw January 16, 2026 14:50
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.81%. Comparing base (8ba3ae3) to head (71ea428).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14438      +/-   ##
==========================================
+ Coverage   91.80%   91.81%   +0.01%     
==========================================
  Files         677      677              
  Lines       42608    42611       +3     
==========================================
+ Hits        39116    39125       +9     
+ Misses       2429     2425       -4     
+ Partials     1063     1061       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Comment on lines +54 to +62
// 1. the batch sizer is not set and
// 2. the batch section is nonempty,
// then use the same value as the queue sizer if set, otherwise default to items.
if !conf.IsSet("batch::sizer") && conf.IsSet("batch") && conf.Get("batch") != nil {
if conf.IsSet("sizer") {
cfg.Batch.Get().Sizer = cfg.Sizer
} else {
cfg.Batch.Get().Sizer = request.SizerTypeItems
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic is not correct, because if the caller has set a different default for the batch sizer this overwrites that.

I am not sure what happens here, because based on NewDefaultQueueConfig the default should be items. Can you add a test that starts from NewDefaultQueueConfig and proves this bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are totally right. Though I reproduced the issue but was wrong.
After doing another review, found the issue is actually fixed. Will close this PR and post a comment in the ticket.

Thanks!

@iblancasa iblancasa closed this Jan 19, 2026
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.

batch::sizer does not default to items when sending_queue::sizer is not set

2 participants