Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writer: ensure batching logic factors in message headers #1132

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

dominicbarnes
Copy link
Contributor

@dominicbarnes dominicbarnes commented May 19, 2023

Currently, the decision to include a message in a batch does not consider headers, so you can get payloads that are larger than intended if you are close to your upper limit and then include headers. This adds a new test for batching with headers that failed and then a fix was added to correct the failing test. This also updates another test that began failing once we included the header length in this calculation.

This closes #1050

@dominicbarnes dominicbarnes force-pushed the issue-1050-message-batching-headers branch from e484d20 to cb2a487 Compare May 19, 2023 05:15
@dominicbarnes
Copy link
Contributor Author

@kung-foo would you be willing to use this branch of kafka-go to see if it actually fixes the error you reported in #1050 ?

@rhansen2 rhansen2 merged commit 8492075 into main Jun 23, 2023
@rhansen2 rhansen2 deleted the issue-1050-message-batching-headers branch June 23, 2023 17:15
mostafa added a commit to mostafa/xk6-kafka that referenced this pull request Sep 20, 2023
* Update Go, k6 and other dependencies
* Update actions
* Increase golangci-lint timeout
* Clean up after the test
* Update tests to compensate for the size of the header
Issue: segmentio/kafka-go#1050
PR: segmentio/kafka-go#1132
Release: https://github.com/segmentio/kafka-go/releases/tag/v0.4.41
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.

Message accounting does not include size of headers.
2 participants