use RatisConsensus.addPeer for a DataRegion , it does not works
- Lenguaje dominante
- Java
- Estrellas
- 6.4k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 115
Descripción
**Describe the bug**
use RatisConsensus.addPeer to migrate data/schema region, but it does not works
**To Reproduce**
Steps to reproduce the behavior:
1. insert data to device
`SET STORAGE GROUP TO root.ln;
CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN, ENCODING=PLAIN;
CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=RLE;
INSERT INTO root.ln.wf01.wt01(timestamp,status) values(100,true);
INSERT INTO root.ln.wf01.wt01(timestamp,status,temperature) values(200,false,20.71);`
2. the data region **RG1** is on **Node1** and **Node2**.
3. call RatisConsensus.addPeer at **Node1** to add a new peer(**Node3**) for **RG1**.
4. it not woks, and repeat a same log info in **Node1**:
2022-06-09 10:52:40,469 [192.168.42.91-40010-server-thread1] INFO o.a.r.s.i.RaftServerImpl:1080 - 192.168.42.91-40010@group-000100000005: receive setConfiguration SetConfigurationRequest:client-C232F01F647A->192.168.42.91-40010@group-000100000005, cid=9, seq=0, RW, null, peers:[192.168.42.74-40010|rpc:192.168.42.74:40010|admin:|client:|dataStream:|priority:0, 192.168.42.91-40010|rpc:192.168.42.91:40010|admin:|client:|dataStream:|priority:0, 192.168.42.128-40010|rpc:192.168.42.128:40010|admin:|client:|dataStream:|priority:1]
2022-06-09 10:52:40,677 [192.168.42.91-40010-server-thread1] INFO o.a.r.s.i.RaftServerImpl:1080 - 192.168.42.91-40010@group-000100000005: receive setConfiguration SetConfigurationRequest:client-C232F01F647A->192.168.42.91-40010@group-000100000005, cid=9, seq=0, RW, null, peers:[192.168.42.74-40010|rpc:192.168.42.74:40010|admin:|client:|dataStream:|priority:0, 192.168.42.91-40010|rpc:192.168.42.91:40010|admin:|client:|dataStream:|priority:0, 192.168.42.128-40010|rpc:192.168.42.128:40010|admin:|client:|dataStream:|priority:1]
5. repeat log info in new peer Node(**Node3**) :
2022-06-09 10:30:40,712 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:31:04,712 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:31:28,713 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:31:52,714 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:32:16,714 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:32:40,715 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:33:04,719 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:33:28,717 [grpc-default-executor-0] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
2022-06-09 10:33:52,719 [grpc-default-executor-5] INFO o.a.r.g.s.GrpcServerProtocolService$ServerRequestStreamObserver:140 - 192.168.42.74-40010: Completed APPEND_ENTRIES, lastRequest: 192.168.42.128-40010->192.168.42.74-40010#1-t2,previous=(t:0, i:0),leaderCommit=6,initializing? false,entries: size=7, first=(t:1, i:0), CONFIGURATIONENTRY
Guía de contribución
Línea de trabajo
Comienza reproduciendo la migración de RG1 con el SQL proporcionado y la llamada a RatisConsensus.addPeer; después, inspecciona los logs repetidos de setConfiguration y APPEND_ENTRIES de Node1 y Node3. Se considera completado cuando Node3 se une correctamente a RG1 y la región de datos y esquema migrada puede utilizarse allí.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- databases, distributed-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100