Skip to content

fix(sdk): respect max_buffer_size when merging batches - #3933

Merged
spetz merged 6 commits into
apache:masterfrom
haubur:fix/sdk-producer-max-buffer
Aug 31, 2026
Merged

fix(sdk): respect max_buffer_size when merging batches#3933
spetz merged 6 commits into
apache:masterfrom
haubur:fix/sdk-producer-max-buffer

Conversation

@haubur

@haubur haubur commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Closes #3932

Rationale

Respect the max_buffer_size such that the BackpressureMode can kick in.

What changed?

Merge both inner IggyMessages and the OwnedSemaphorePermits (bytes_permit), freeing only when written, not after merge.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

None

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.86466% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.80%. Comparing base (e80992b) to head (aba71ca).

Files with missing lines Patch % Lines
core/sdk/src/clients/producer_dispatcher.rs 91.02% 3 Missing and 4 partials ⚠️
core/sdk/src/clients/producer_sharding.rs 97.87% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3933      +/-   ##
============================================
- Coverage     84.95%   84.80%   -0.16%     
  Complexity     1405     1405              
============================================
  Files          1225     1225              
  Lines        179727   179932     +205     
  Branches     146014   146219     +205     
============================================
- Hits         152689   152590      -99     
- Misses        23013    23282     +269     
- Partials       4025     4060      +35     
Components Coverage Δ
Rust Core 85.80% <95.86%> (-0.05%) ⬇️
Java SDK 67.35% <ø> (ø)
C# SDK 75.39% <ø> (+0.08%) ⬆️
Python SDK 90.06% <ø> (ø)
PHP SDK 85.65% <ø> (ø)
Node SDK 94.51% <ø> (-1.74%) ⬇️
Go SDK 69.36% <ø> (+0.03%) ⬆️
Files with missing lines Coverage Δ
core/sdk/src/clients/producer_sharding.rs 95.80% <97.87%> (+1.13%) ⬆️
core/sdk/src/clients/producer_dispatcher.rs 95.30% <91.02%> (+0.70%) ⬆️

... and 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread core/sdk/src/clients/producer_sharding.rs Outdated
Comment thread core/sdk/src/clients/producer_sharding.rs Outdated
spetz
spetz previously approved these changes Aug 31, 2026
hubcio
hubcio previously approved these changes Aug 31, 2026
@spetz
spetz dismissed stale reviews from hubcio and themself via fa1267a August 31, 2026 11:26
spetz
spetz previously approved these changes Aug 31, 2026
hubcio
hubcio previously approved these changes Aug 31, 2026
@spetz
spetz dismissed stale reviews from hubcio and themself via 2fef029 August 31, 2026 12:13
@spetz
spetz force-pushed the fix/sdk-producer-max-buffer branch from 0bd1468 to 2fef029 Compare August 31, 2026 12:13
@spetz
spetz merged commit dc1cdf2 into apache:master Aug 31, 2026
167 of 172 checks passed
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Aug 31, 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.

bug(Rust SDK): on merge of ShardMessages the buffer budget is freed before messages are send

5 participants