use RatisConsensus.addPeer for a DataRegion , it does not works
- Ngôn ngữ chính
- Java
- Star
- 6.4k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 115
Mô tả
**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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện quá trình di chuyển RG1 với SQL được cung cấp và lệnh gọi RatisConsensus.addPeer, sau đó kiểm tra các log setConfiguration và APPEND_ENTRIES lặp lại từ Node1 và Node3. Được xem là hoàn tất khi Node3 tham gia RG1 thành công và vùng dữ liệu và schema đã di chuyển có thể được sử dụng tại đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- databases, distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100