Skip to content

Conversation

@kamir
Copy link
Collaborator

@kamir kamir commented Jan 16, 2026

Summary

Problem

  • FindCoordinator could return a broker ID that was missing from Metadata, causing Kafka clients to retry because the coordinator identity could not be reconciled with broker metadata.

Solution

  • Select the coordinator broker from the metadata snapshot first, falling back to local broker info only if metadata is unavailable, and default broker ID to 0 to align with operator snapshots.

How It Works

  • On FindCoordinator, the handler loads metadata and returns a broker ID that exists in the advertised broker list; if the local ID is missing, it returns the first metadata broker, and if metadata fails, it uses local broker info.

Why Tests/Benchmarks Missed It

  • E2E Franz runs use in-memory metadata seeded from the same broker info, operator e2e paths use broker IDs derived from pod ordinals that match snapshots, and benchmarks use kcat produce/consume without consumer groups (no FindCoordinator).

Testing

  • go test ./...
  • make test-produce-consume (broker changes)
  • make test-consumer-group (group changes)

Checklist

  • Added/updated unit tests for new logic
  • Added/updated e2e coverage for bug fixes
  • Added license headers to new files

Copy link
Collaborator

@novatechflow novatechflow left a comment

Choose a reason for hiding this comment

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

.github/pull_request_template.md is used to prefill PR's. This file has not to be changed. Please revert to the original.

@novatechflow
Copy link
Collaborator

this PR will fix issue #70

Copy link
Collaborator

@novatechflow novatechflow left a comment

Choose a reason for hiding this comment

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

thank you @kamir - great catch!

@novatechflow novatechflow merged commit a13c56f into main Jan 17, 2026
9 checks passed
@novatechflow novatechflow deleted the fetching-timeout-fix-01 branch January 17, 2026 11:00
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.

3 participants