Skip to content

fix(rust,sdk): stop late offset stores from hitting a left group#3668

Merged
spetz merged 1 commit into
masterfrom
fix_sdk_consumer_store_offset_task
Jul 14, 2026
Merged

fix(rust,sdk): stop late offset stores from hitting a left group#3668
spetz merged 1 commit into
masterfrom
fix_sdk_consumer_store_offset_task

Conversation

@spetz

@spetz spetz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

IntervalOrEach/Each/Every auto-commit modes queue offset stores
through a background channel task instead of storing them inline.
shutdown() left the consumer group right after a direct final
flush, with no idea the channel task still had a backlog. Under
real throughput the backlog landed after the group was already
left, and the broker rejected every one of them as an unknown
group member (5006, consumer_group_member_not_found).

shutdown() now closes the channel and wakes the periodic commit
loop first, awaiting both tasks before leaving the group. The
wait is bounded by a new configurable offset_drain_timeout (5s
default, set via IggyConsumerBuilder). On timeout the task is
aborted outright instead of left detached, so a slow drain can
no longer fire a stale store after the leave call returns.

Also cleared joined_consumer_group unconditionally after the
leave attempt. A failed leave RPC used to leave it stuck true.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jul 13, 2026
@spetz spetz added bug Something isn't working sdk Change related to sdk (client) API rust Pull requests that update Rust code labels Jul 13, 2026
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.05882% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.25%. Comparing base (5a5bc9a) to head (6a46cd8).

Files with missing lines Patch % Lines
core/sdk/src/clients/consumer.rs 51.16% 21 Missing ⚠️
core/sdk/src/clients/consumer_builder.rs 25.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3668      +/-   ##
============================================
- Coverage     73.49%   73.25%   -0.25%     
  Complexity      937      937              
============================================
  Files          1291     1291              
  Lines        141568   141312     -256     
  Branches     117128   116944     -184     
============================================
- Hits         104046   103512     -534     
- Misses        34300    34498     +198     
- Partials       3222     3302      +80     
Components Coverage Δ
Rust Core 73.48% <47.05%> (-0.23%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.04% <ø> (-1.17%) ⬇️
Python SDK 92.17% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.26% <ø> (-0.10%) ⬇️
Go SDK 42.28% <ø> (ø)
Files with missing lines Coverage Δ
core/sdk/src/clients/producer.rs 64.08% <ø> (-1.39%) ⬇️
core/sdk/src/clients/producer_dispatcher.rs 93.95% <ø> (ø)
core/sdk/src/clients/consumer_builder.rs 60.24% <25.00%> (-1.85%) ⬇️
core/sdk/src/clients/consumer.rs 65.51% <51.16%> (-1.07%) ⬇️

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

@spetz spetz merged commit 41790d7 into master Jul 14, 2026
94 checks passed
@spetz spetz deleted the fix_sdk_consumer_store_offset_task branch July 14, 2026 07:50
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rust Pull requests that update Rust code sdk Change related to sdk (client) API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants