[Bug] PD raft port accepts jraft CLI membership requests, which bypass the checks of changePeerList and updatePdRaft
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #3387 @Mihir-Rabari による — マージ済み
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start with RaftEngine.createRaftRpcServer and inspect how RaftRpcServerFactory.createRaftRpcServer(endpoint) registers CLI processors alongside replication processors. Trace changePeerList and PDService.updatePdRaft to identify the checks these requests must share. The issue describes either removing CLI membership processors while retaining replication processors, and optionally GetLeader and GetPeers, or wrapping them with the same checks; done means CLI requests cannot bypass those checks. Pull request #3387 is already open.
索引モデルが issue の本文から書いたものです。
説明
Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
- I have confirmed and searched that there are no similar problems in the historical issue and documents
Environment (环境信息)
- Server Version: PD on
masterat86c05ef9c(1.8.0-SNAPSHOT), jraft 1.3.14 (jraft.versionin the root pom) - Backend: PD raft group (3 or more PD nodes)
- OS: any
- Data Size: N/A
Expected & Actual behavior (期望与实际表现)
PD changes its raft membership through two of its own entry points, RaftEngine.changePeerList (the changePeerList RPC and REST call) and PDService.updatePdRaft. Its raft RPC server also accepts jraft's own CLI membership requests, which bypass both.
RaftEngine.createRaftRpcServer builds the server with RaftRpcServerFactory.createRaftRpcServer(endpoint), which registers jraft's CLI processors next to the replication ones. Checked with javap on the jraft 1.3.14 jar, RaftRpcServerFactory adds, among others:
cli/AddPeerRequestProcessor
cli/RemovePeerRequestProcessor
cli/ChangePeersRequestProcessor
cli/ResetPeerRequestProcessor
cli/AddLearnersRequestProcessor
cli/RemoveLearnersRequestProcessor
cli/ResetLearnersRequestProcessor
cli/TransferLeaderRequestProcessor
cli/SnapshotRequestProcessor
So a jraft CliService client that reaches a PD raft port can add, remove or reset peers and learners, or transfer the leadership, with none of the checks PD runs on its own paths. Today that skips, for example, the odd peer count check of changePeerList and the IpAuthHandler refresh after a change. The raft IP allowlist (raft.ip-whitelist.enabled, on by default) limits such a client to the IPs of the current peers, so it has to run on a PD host or share its IP.
It matters more once PD checks peers before a membership change. #3376 adds a txn raft entry, and both of PD's own membership paths refuse to add a peer that does not apply that entry, since an older PD would skip it when it replays the log. A peer added through the CLI processors is not checked.
Expected: membership changes go through one path that runs PD's checks. Either the CLI membership processors are not registered on PD's raft server (keeping the replication processors and, if wanted, GetLeader and GetPeers), or they are wrapped so they run the same checks as changePeerList.
Vertex/Edge example (问题点 / 边数据举例)
N/A
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
N/A
- 主要言語
- Java
- スター
- 3.2k
- フォーク
- 640
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 98
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/hugegraph のほかの issue
-
[Bug] PD task REST: balanceLeaders throws a bare HTTP 500 during the balance-shard window, and task responses cannot be told apart from a no-op or a follower answer対応中かも @pallavithegod が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
apache/hugegraph#3231 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
[Bug] PD TTL cleanup deletes the marker-shaped name instead of the expired key, so expired values stay in the store until read対応中かも @bitflicker64 が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
[Task] Establish systematic performance baselines and optimization tracking対応中かも @contrueCT が 6 日前に担当しました。 オープンhelp wanted improvement rust
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
apache/hugegraph#3346 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/hugegraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
2026 Error Report
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
triplea-game/triplea#15096 ·
メンテナーはふだん 1 日以内に返信
-
[Bug][API] Switching workflow versions leaves schedules online対応中かも @zhuangchong が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/dolphinscheduler#18731 ·
メンテナーはふだん 1 日以内に返信
-
Implement JDBC Domain Enums (`SqlCategory`, `SqlExecutionStatus`, `SqlExecutionType`) in Core Moduleオープンcore-module enhancement good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
sdlc-pro/spring-lens#531 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/rocketmq-dashboard#7340 ·
メンテナーはふだん 3 日以内に返信