Repository navigation
fix(binding-kafka): wrap group assignment userdata at buffer start - #3292
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SiHVoTzEmnPYgqKSSa5qPx
Each SyncGroup member build wrapped the shared userdata builder at its previous limit, so the offset only grew across requests on a worker until the fixed buffer overflowed and stopped the engine. Wrap at 0 as each member's userdata is copied out before the next is built. Fixes #3288 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SiHVoTzEmnPYgqKSSa5qPx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
KafkaClientGroupFactorybuilds the SyncGroup assignment userdata in a per-workeruserdataBuffer. For each member it wrapped the sharedassignmentTopicsUserdataRWbuilder atassignmentTopicsUserdataRW.limit(), which is the end of the previous build. The offset therefore only grew, across members and across SyncGroup requests handled by the same worker, until the fixed buffer (buffer.slot.capacity+ 1 KiB = 33792 bytes by default) overflowed withIndexOutOfBoundsExceptionand the engine stopped.Each member's userdata is copied into
extBufferbefore the next member is built, so the builder is now wrapped at offset 0 for every member, as the same factory already does fortopicPartitionsRW.wrap(extBuffer, 0, ...). Buffer size is unchanged.The 33792 limit matches the report: one QoS 1 consumer group contributes about 84 bytes of userdata per SyncGroup, so roughly 400 groups on a worker reach the limit.
Tests (written first, commit
a758c3e2f):rebalance.assignment.userdata.repeated: five rebalance generations on one group stream, each assigning about 7 KiB of userdata. One generation fits the buffer; five accumulated do not.ClientGroupIT.shouldAssignUserdataAcrossRepeatedRebalanceruns it against the engine. On the unfixed code it fails withlimit=35205 is beyond maxLimit=33792.GroupIT(application and network) run the client/server pair against each other.Fixes #3288
Generated by Claude Code