[Bug] PD raft port accepts jraft CLI membership requests, which bypass the checks of changePeerList and updatePdRaft
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 3.2k
- Forks
- 640
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 90
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/hugegraph
-
[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 answerPosiblemente ocupada @pallavithegod la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
apache/hugegraph#3231 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
[Bug] RaftEngineReadIndexTest fails now and then with UnfinishedStubbingException: the alive-peers refresher can call the mocked raft node while a test stubs itPosiblemente ocupada @Mihir-Rabari la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
[Bug] PD TTL cleanup deletes the marker-shaped name instead of the expired key, so expired values stay in the store until readPosiblemente ocupada @bitflicker64 la tomó hace 2 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
[Task] Establish systematic performance baselines and optimization trackingPosiblemente ocupada @contrueCT la tomó hace 6 días. Abiertohelp wanted improvement rust
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
apache/hugegraph#3346 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/hugegraph
Issues similares
-
status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
JabRef/jabref#17546 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
hiero-ledger/hiero-sdk-java#3010 ·
Los mantenedores suelen responder en 1 día
-
Optimize consumer version heatmap aggregation to avoid repeated scansPosiblemente ocupada @praykaria31 la tomó hoy. Abiertotype/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Apicurio/apicurio-registry#10662 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
a:false-positive
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
status: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
spring-projects/spring-boot#52347 ·
Los mantenedores suelen responder en 2 días