Skip to content

test(cluster): test the Kafka gateway and the SDK on split primaries - #4642

Merged
hubcio merged 5 commits into
masterfrom
kafka-cluster-failover-test
Oct 28, 2026
Merged

hubcio merged 5 commits into
masterfrom
kafka-cluster-failover-test

Conversation

@krishvishal

Copy link
Copy Markdown
Member

Which issue does this PR address?

Relates to #4409.
Relates to #4436.

Rationale

No test ran the Kafka gateway against an Iggy cluster. The gateway docs still told users to set auto.offset.reset=earliest in a cluster. The reason was #4409: an offset read went to the node that the gateway dials. That node can be a backup that did not apply the commit yet. #4561 sends offset reads to the partition primary, but nothing checked this through the gateway. Also, nothing measured the effect of an Iggy node stop on a Kafka client.

#4436 reported that once partition primaries sit on different nodes, the SDK moved its session on nearly every send. The gateway talks to Iggy through such an SDK session. #4506 and #4561 replaced that send path. #4437 held the failing test, but it used the retired route code 103 and was closed on 2026-10-24. So no test covers one producer that sends to partitions on different primaries.

The script stops and restarts Iggy nodes under Kafka load, and fails if a record is missing or an offset reads back wrong.
One producer sends in turn to 3 partitions whose primaries sit on different nodes, the case of #4436.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Oct 25, 2026
@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.82%. Comparing base (c0f0503) to head (0a9eb42).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4642      +/-   ##
============================================
+ Coverage     81.13%   90.82%   +9.69%     
- Complexity     3104     3109       +5     
============================================
  Files          1479     1479              
  Lines        361309   361306       -3     
  Branches     305179   305434     +255     
============================================
+ Hits         293148   328167   +35019     
+ Misses        61219    26250   -34969     
+ Partials       6942     6889      -53     
Components Coverage Δ
Rust Core 92.15% <ø> (+11.66%) ⬆️
Java SDK 78.19% <ø> (+0.04%) ⬆️
C# SDK 83.50% <ø> (-0.10%) ⬇️
Python SDK 85.67% <ø> (ø)
PHP SDK 90.71% <ø> (ø)
Node SDK 96.44% <ø> (ø)
Go SDK 69.30% <ø> (ø)
C++ SDK 85.55% <ø> (ø)
see 492 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 merged commit 922c6d1 into master Oct 28, 2026
114 checks passed
@hubcio
hubcio deleted the kafka-cluster-failover-test branch October 28, 2026 23:57
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Oct 28, 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