use RatisConsensus.addPeer for a DataRegion , it does not works
- Langage dominant
- Java
- Étoiles
- 6.4k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 115
Description
**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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire la migration de RG1 avec le SQL fourni et l’appel à RatisConsensus.addPeer, puis examinez les logs setConfiguration et APPEND_ENTRIES répétés de Node1 et Node3. C’est terminé lorsque Node3 rejoint RG1 avec succès et que la région de données et de schéma migrée peut y être utilisée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- databases, distributed-systems
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100