Serve consumer offset reads from the partition primary

オープン
#4,409 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@numinnex がすでに取り組んでいます。

2026年10月8日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

rust server
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.

主要言語
Rust
スター
5.3k
フォーク
548
平均マージ
2日 20時間
マージ済み PR(30日)
194

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。