fix(go,csharp): remove duplicate consumer groups in DeserializeClient/MapClient#3164
Merged
hubcio merged 3 commits intoApr 27, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3164 +/- ##
============================================
- Coverage 73.61% 72.77% -0.85%
Complexity 943 943
============================================
Files 1141 1117 -24
Lines 100869 96105 -4764
Branches 78043 73303 -4740
============================================
- Hits 74254 69939 -4315
+ Misses 23958 23605 -353
+ Partials 2657 2561 -96
🚀 New features to boost your workflow:
|
lukaszzborek
approved these changes
Apr 26, 2026
Contributor
lukaszzborek
left a comment
There was a problem hiding this comment.
approve for csharp
for go looks the same 😅, but not sure about how tests looks like. Now there is no tests for that part
numinnex
approved these changes
Apr 27, 2026
ryankert01
approved these changes
Apr 27, 2026
hubcio
approved these changes
Apr 27, 2026
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.
Which issue does this PR close?
Closes #3131
Rationale
DeserializeClient(Go) andMapClient(C#) return duplicate/zero-valued consumer groups due to incorrect slice pre-allocation and a redundant outer loop.What changed?
In Go,
make([]ConsumerGroupInfo, Count)pre-allocatedCountzero-valued entries, thenappendadded real data after them—doubling the slice. The outerfor position < lengthloop could also re-read groups if trailing bytes existed.Fixed both SDKs by using
make([], 0, Count)(Go) /new List<>(Count)(C#) for correct capacity-only allocation, and replaced the outerwhile/forloop with a single boundedfor i < Countpass.Local Execution
AI Usage
go build,go vet,go test,dotnet build,dotnet test(100/100 passed), and CI lint scripts