[Server] Clean leader reassignment can leave divergent WAL in an ISR replica
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #4273 @platinumhamburg による — マージされずにクローズ
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
ReassignmentLeaderElectionとレプリケーションプロトコルから始め、次にissueで説明されている3レプリカのシーケンスを再現します。再割り当て中のリーダー変更、フォロワーHW、ローカルLEOを追跡します。完了の条件は、acks=-1の書き込みが確認応答される前に、クリーンな移行によって共通のログプレフィックスが確立されることです。
索引モデルが issue の本文から書いたものです。
説明
Search before asking
- I searched in the issues and found nothing similar.
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
A clean leader reassignment can leave replicas with different records at the same offsets, while the new leader acknowledges writes with acks=-1 and all replicas remain in the ISR.
This was reproduced using a regular Log Table without secondary indexes.
Steps to reproduce
Use three replicas, A, B, and C, with A as leader and ISR [A, B, C]. All offset ranges below are half-open.
- Append and commit a common prefix
[0,10)on all three replicas. - Append another batch
[10,15)to A withacks=1. Deliver its replication response only to C. B remains at offset 10 and stays in the ISR; A's HW remains 10. - Perform a clean leader reassignment to B using
ReassignmentLeaderElection. - Append different records to B. Since B's LEO is 10, these records occupy
[10,15). - Resume replication from B to A and C.
Actual behavior
The write in step 4 completes successfully with acks=-1, but the replicas contain:
| Replica | HW | Records at offsets 10–14 |
|---|---|---|
| A | 15 | New records from B |
| B, current leader | 15 | New records |
| C, still in ISR | 15 | Old records from A |
The previously committed prefix [0,10) remains intact. The inconsistency affects the replacement records acknowledged by the new leader.
Solution
The replication protocol needs to establish a common log prefix when leadership changes, rather than treating matching offsets as proof of matching history. Leader-epoch-based reconciliation and the relationship between follower HW and local LEO need to be considered together.
Append offset-continuity checks alone would not detect this case because the divergent records occupy the same offsets.
Related work
Tracked under #673.
This issue documents a reproducible WAL divergence during a normal,
clean ISR leader migration: a write can be acknowledged while ISR
replicas retain different records at the same offsets.
Related implementation work: #778, #788, and #789.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- 主要言語
- Java
- スター
- 2.2k
- フォーク
- 656
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 127
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/fluss のほかの issue
-
[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` key対応中かも @aphenix-r7 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/fluss#4658 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[common] Decimal#hashCode is inconsistent with Decimal#equals対応中かも @firasbouzazi が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/fluss#4538 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failure対応中かも @xinzhang-hello が 19 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
[server] KV snapshot scheduling stops permanently after a transient snapshot-init failure対応中かも @zhang-arvin が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
apache/fluss#4489 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[docs] Document advertised-resource and ACL principal ignore-case options対応中かも @EchoLee5 が 31 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/rocketmq-dashboard#6896 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenIntegrationEngine/engine#496 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SasanLabs/VulnerableApp#836 ·
メンテナーはふだん 1 日以内に返信