Skip to content

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

Open
haubur wants to merge 1 commit into
apache:masterfrom
haubur:fix/sdk-producer-max-buffer
Open

fix(sdk): respect max_buffer_size when merging batches#3933
haubur wants to merge 1 commit 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.31%. Comparing base (c0c7493) to head (635eed5).

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3933       +/-   ##
=============================================
- Coverage     83.87%   70.31%   -13.56%     
  Complexity     1358     1358               
=============================================
  Files          1212     1212               
  Lines        166843   142867    -23976     
  Branches     134306   110454    -23852     
=============================================
- Hits         139937   100459    -39478     
- Misses        23266    38588    +15322     
- Partials       3640     3820      +180     
Components Coverage Δ
Rust Core 67.07% <100.00%> (-17.58%) ⬇️
Java SDK 66.67% <ø> (ø)
C# SDK 75.06% <ø> (-1.49%) ⬇️
Python SDK 90.13% <ø> (ø)
PHP SDK 84.48% <ø> (ø)
Node SDK 95.84% <ø> (ø)
Go SDK 68.32% <ø> (ø)
Files with missing lines Coverage Δ
core/sdk/src/clients/producer_sharding.rs 95.85% <100.00%> (+1.18%) ⬆️

... and 354 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.

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

Labels

S-waiting-on-review PR is waiting on a reviewer

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

1 participant