Skip to content

feat(server-ng): port consumer group - #3527

Merged
numinnex merged 15 commits into
masterfrom
cg_port
Jun 25, 2026
Merged

feat(server-ng): port consumer group#3527
numinnex merged 15 commits into
masterfrom
cg_port

Conversation

@numinnex

Copy link
Copy Markdown
Contributor

This PR ports the consumer group mechanism to server-ng, maintaining the cooperative rebalancing mechanism and extending it to accommodate for the fact that the server is distributed.

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

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.52271% with 1178 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.99%. Comparing base (8a19837) to head (d75db66).

Files with missing lines Patch % Lines
core/metadata/src/stm/stream.rs 22.56% 246 Missing and 8 partials ⚠️
core/metadata/src/stm/consumer_group.rs 45.41% 229 Missing and 15 partials ⚠️
core/server-ng/src/dispatch.rs 0.00% 209 Missing ⚠️
core/server-ng/src/responses.rs 0.00% 147 Missing ⚠️
core/server-ng/src/consumer_group.rs 0.00% 124 Missing ⚠️
core/metadata/src/impls/metadata.rs 0.00% 90 Missing ⚠️
core/server-ng/src/partition_reconciler.rs 82.67% 43 Missing and 1 partial ⚠️
core/server-ng/src/bootstrap.rs 0.00% 27 Missing ⚠️
core/partitions/src/iggy_partition.rs 45.45% 17 Missing and 1 partial ⚠️
core/server-ng/src/session_manager.rs 43.33% 17 Missing ⚠️
... and 1 more

❌ Your patch check has failed because the patch coverage (35.52%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3527      +/-   ##
============================================
- Coverage     74.42%   73.99%   -0.43%     
  Complexity      937      937              
============================================
  Files          1243     1247       +4     
  Lines        125987   127567    +1580     
  Branches     101857   103481    +1624     
============================================
+ Hits          93760    94396     +636     
- Misses        29212    30081     +869     
- Partials       3015     3090      +75     
Components Coverage Δ
Rust Core 74.67% <35.52%> (-0.49%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.40% <ø> (-0.73%) ⬇️
Python SDK 88.88% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.22% <ø> (-0.13%) ⬇️
Go SDK 40.14% <ø> (ø)
Files with missing lines Coverage Δ
core/binary_protocol/src/codes.rs 100.00% <ø> (ø)
core/binary_protocol/src/consensus/header.rs 80.35% <100.00%> (+0.03%) ⬆️
core/binary_protocol/src/consensus/operation.rs 96.42% <100.00%> (+0.06%) ⬆️
core/binary_protocol/src/dispatch.rs 91.63% <100.00%> (+0.17%) ⬆️
core/binary_protocol/src/primitives/consumer.rs 100.00% <ø> (ø)
...rc/requests/consumer_groups/sync_consumer_group.rs 100.00% <100.00%> (ø)
...c/responses/consumer_groups/sync_consumer_group.rs 100.00% <100.00%> (ø)
core/common/src/error/iggy_error.rs 100.00% <ø> (ø)
.../common/src/traits/binary_impls/consumer_groups.rs 100.00% <ø> (ø)
core/common/src/traits/binary_impls/messages.rs 100.00% <ø> (ø)
... and 23 more

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

@hubcio hubcio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one finding lands on code outside this PR's diff so it can't be a line comment:

in core/binary_protocol/src/consensus/operation.rs, the command_code_roundtrip test's ops array skips from DeletePersonalAccessToken straight to SendMessages, omitting Operation::JoinConsumerGroup/LeaveConsumerGroup. this PR flips both from non-replicated to replicated-with-code, so their op<->code mapping in to_command_code/from_command_code is now live but unexercised by that test. add both variants (the lookup_by_operation_roundtrips_with_lookup_command array has the same omission).

Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/common/src/traits/binary_impls/messages.rs
Comment thread core/common/src/traits/binary_impls/messages.rs Outdated
Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/server-ng/src/consumer_group.rs Outdated
Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/server-ng/src/consumer_group.rs Outdated
Comment thread core/server-ng/src/consumer_group.rs Outdated
Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/metadata/src/stm/consumer_group.rs
@numinnex

Copy link
Copy Markdown
Contributor Author

/ready

Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/server-ng/src/consumer_group.rs Outdated
Comment thread core/common/src/consumer_group_client_state.rs Outdated
Comment thread core/server-ng/src/consumer_group.rs Outdated
Comment thread core/server-ng/src/partition_reconciler.rs Outdated
Comment thread core/metadata/src/stm/stream.rs Outdated
Comment thread core/metadata/src/impls/metadata.rs Outdated
Comment thread core/metadata/src/stm/consumer_group.rs Outdated
Comment thread core/integration/tests/server/mod.rs
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 24, 2026
@numinnex

numinnex commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

I cannot enable the hot/cold consumer group creation tests under vsr feature flag, as it relies on error messages being propagated from the server which are introduced in #3553, after it's merged I will create another PR that enables those + some other tests that are blocked by it.

@numinnex

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 24, 2026
@numinnex
numinnex merged commit 1932014 into master Jun 25, 2026
90 checks passed
@numinnex
numinnex deleted the cg_port branch June 25, 2026 08:31
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jun 25, 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.

4 participants