未验证 提交 801ae02d 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17830 from taosdata/fix/TD-20095

fix: add dnode status log
......@@ -403,6 +403,10 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
bool reboot = (pDnode->rebootTime != statusReq.rebootTime);
bool needCheck = !online || dnodeChanged || reboot;
pDnode->accessTimes++;
mTrace("dnode:%d, status received, access times:%d check:%d online:%d reboot:%d changed:%d", pDnode->id,
pDnode->accessTimes, needCheck, online, reboot, dnodeChanged);
if (needCheck) {
if (statusReq.sver != tsVersion) {
if (pDnode != NULL) {
......@@ -424,9 +428,6 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
pMnode->clusterId);
terrno = TSDB_CODE_MND_INVALID_CLUSTER_ID;
goto _OVER;
} else {
pDnode->accessTimes++;
mDebug("dnode:%d, status received, access times %d", pDnode->id, pDnode->accessTimes);
}
}
......
......@@ -45,74 +45,9 @@ if $data(4)[4] != ready then
goto step1
endi
return
return
print =============== step2: create database
sql create database db vgroups 1 replica 3
sql select * from information_schema.ins_databases
if $rows != 3 then
return -1
endi
if $data(db)[4] != 3 then
return -1
endi
sql select * from information_schema.ins_dnodes
if $data(2)[2] != 1 then
return -1
endi
if $data(3)[2] != 1 then
return -1
endi
if $data(4)[2] != 1 then
return -1
endi
# vnodes
sql select * from information_schema.ins_dnodes
if $data(2)[2] != 1 then
return -1
endi
if $data(3)[2] != 1 then
return -1
endi
if $data(4)[2] != 1 then
return -1
endi
# v1_dnode
$hasleader = 0
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 20 then
print ====> dnode not ready!
return -1
endi
sql show db.vgroups
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
if $data(2)[3] != 2 then
return -1
endi
if $data(2)[5] != 3 then
return -1
endi
if $data(2)[7] != 4 then
return -1
endi
if $data(2)[4] == leader then
$hasleader = 1
endi
if $data(2)[6] == leader then
$hasleader = 1
endi
if $data(2)[8] == leader then
$hasleader = 1
endi
if $hasleader != 1 then
goto step2
endi
sql create database db vgroups 33 replica 3
sql use db;
sql create table stb (ts timestamp, c int) tags (t int);
......@@ -122,6 +57,8 @@ sql select * from information_schema.ins_stables where db_name = 'db';
sql select * from information_schema.ins_tables where db_name = 'db';
sql show db.vgroups;
system sh/exec.sh -n dnode2 -s stop
return
print ======== start back
run_back tmp/back.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册