apache / apache/iotdb

use RatisConsensus.addPeer for a DataRegion , it does not works

オープン
#6,205 コメント 11 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
6.4k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
115

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、提供された SQL と RatisConsensus.addPeer の呼び出しを使って RG1 の移行を再現し、次に Node1 と Node3 から出力される setConfiguration および APPEND_ENTRIES の繰り返しログを調査します。Node3 が RG1 に正常に参加し、移行されたデータおよびスキーマ領域をそこで使用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
databases, distributed-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。