contrib/kafka: Bumping the Kafka protocol to 4.x drops client protocol support below 2.1

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

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

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp, kafka
領域
networking

調査の方向性

Start from the kafka bazel_dep pin and the codec generator that feeds the kafka_broker/kafka_mesh contrib filters, then read the per-version round-trip tests that assert which request versions can be parsed. Diff the 3.9.2 spec ranges against the 4.4.0 ones from #49545 to list exactly which versions (Produce v0-2, Fetch v0-3, ListOffsets v0, the controller APIs) disappear. Done means a recorded decision — accept the 2.1 baseline or make the generator emit the union of both ranges — with the test matrix updated to match.

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

説明

area/kafka

Summary

Envoy's kafka_broker / kafka_mesh contrib filters generate their request/response codec from a pinned Apache Kafka protocol module (kafka bazel_dep, currently 3.9.2.envoy). To support clients shipped with Confluent Platform 8.x / cp-kafka 8.x (Apache Kafka 4.x), the module needs to be bumped to a 4.x release (see #49545, which bumps it to 4.4.0 and fixes the generator to consume the 4.x message specs).

Kafka 4.0 (KIP-896) removed the client protocol API versions older than the 2.1 baseline. As a direct consequence, generating the codec from 4.x specs drops the ability to parse those old versions that the 3.9.2 codec can parse today:

  • Produce v0–2, Fetch v0–3, ListOffsets v0 (the pre-2.1 request versions)
  • The ZooKeeper-era controller APIs (LeaderAndIsr / StopReplica / UpdateMetadata / ControlledShutdown) — inter-broker only, not client traffic

The tradeoff / decision needed

This is a behavioural change for the filters and should be decided independently of the mechanics in #49545:

  • A client pinned to one of the removed protocol versions, which works through the filter today, would stop working after the bump.
  • This matches real Kafka 4.0 — a pre-2.1 client cannot talk to a 4.0 broker at all — so for deployments fronting a 4.x broker there is no additional loss.
  • The only genuine regression is: the filter in front of a 3.x broker (which still accepts pre-2.1 clients) with a pre-2.1 client. Today the filter proxies it; after the bump it cannot parse those frames.

Options

  1. Accept the Kafka 2.1 baseline — generate from 4.x specs as-is, matching upstream Kafka. Simplest; loses the narrow 3.x-broker + pre-2.1-client case.
  2. Preserve pre-2.1 support — generate the codec from the union of the old and new version ranges (keep the dropped low-version parsers while adding the 4.x high ones). Keeps the old case alive at the cost of generator work and carrying removed protocol versions.

Backward compatibility within the 2.1+ range is unaffected either way: the per-version codec round-trip tests cover every version still in the spec, so 3.x clients (which negotiate versions well above 2.1) continue to work.

(bot assisted)

主要言語
C++
スター
29.3k
フォーク
5.7k
平均マージ
2日 14時間
マージ済み PR(30日)
408

環境構築

Codespaces で開く

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

はじめの一歩

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

envoyproxy/envoy のほかの issue

envoyproxy/envoy の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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