Serve consumer offset reads from the partition primary
Maintainers usually reply within 2 days
@numinnex is already working on this.
Since Oct 8, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend, distributed-systems
Research direction
Start in core/server/src/dispatch/partition.rs at handle_get_consumer_offset and read the TODO above it; compare the offset-write routing via GET_CONSUMER_OFFSET_ROUTING_CODE and the auto-commit path’s is_caught_up_primary check. Trace the related SDK behavior in ConsumerOffsetClient::get_consumer_offset and the Kafka gateway’s OffsetFetch/OffsetCommit flow. Done when a read immediately after a commit returns the committed offset rather than a stale replica value.
Written by the indexing model from the issue text.
Description
Description
handle_get_consumer_offset answers from the local replica of the partition (see the TODO above it in core/server/src/dispatch/partition.rs). The SDK sends the read to the node it is connected to, and that node can be a backup that lags the partition's primary. A read right after a store can then return the previous offset. #4392 documents this on ConsumerOffsetClient::get_consumer_offset. The Kafka gateway needs read-your-commits: an OffsetFetch right after an OffsetCommit must return the committed offset. Raised in the review of #4392.
Affected area / component
Iggy server, Rust SDK
Proposed solution
Route the read to the partition primary, the way GET_CONSUMER_OFFSET_ROUTING_CODE routes offset writes. Gate it on the server with is_caught_up_primary, as the auto-commit path does.
Alternatives considered
Define a follower-read contract, and let a caller that needs read-your-commits route the read itself.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 548
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 194
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iggy
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
good first issue java test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
Similar issues
-
bug triaged tui ux wontfix
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
bevyengine/bevy#26642 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day