Merge pull request #18246 from taosdata/fix/TD-20508
test: adjust unstable case
This commit is contained in:
commit
a268f8a48f
|
@ -1277,9 +1277,11 @@ static int32_t mndTransExecuteRedoActionsSerial(SMnode *pMnode, STrans *pTrans)
|
|||
pAction->id);
|
||||
code = mndTransSync(pMnode, pTrans);
|
||||
if (code != 0) {
|
||||
pTrans->redoActionPos--;
|
||||
pTrans->code = terrno;
|
||||
mError("trans:%d, %s:%d is executed and failed to sync to other mnodes since %s", pTrans->id,
|
||||
mndTransStr(pAction->stage), pAction->id, terrstr());
|
||||
break;
|
||||
}
|
||||
} else if (code == TSDB_CODE_ACTION_IN_PROGRESS) {
|
||||
mInfo("trans:%d, %s:%d is in progress and wait it finish", pTrans->id, mndTransStr(pAction->stage), pAction->id);
|
||||
|
|
|
@ -1739,6 +1739,7 @@ static int32_t mndSplitVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb, SVgObj
|
|||
code = 0;
|
||||
|
||||
_OVER:
|
||||
taosArrayDestroy(pArray);
|
||||
mndTransDrop(pTrans);
|
||||
sdbFreeRaw(pRaw);
|
||||
return code;
|
||||
|
|
|
@ -35,30 +35,30 @@
|
|||
,,y,script,./test.sh -f tsim/db/show_create_table.sim
|
||||
,,y,script,./test.sh -f tsim/db/tables.sim
|
||||
,,y,script,./test.sh -f tsim/db/taosdlog.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balance_replica1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balance_replica3.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balance1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balance2.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balance3.sim
|
||||
,,,script,./test.sh -f tsim/dnode/balancex.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balance1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balance2.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balance3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/balancex.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/create_dnode.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim
|
||||
,,,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim
|
||||
,,,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim
|
||||
,,,script,./test.sh -f tsim/dnode/drop_dnode_force.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/offline_reason.sim
|
||||
,,,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim
|
||||
,,,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim
|
||||
,,,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim
|
||||
,,,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim
|
||||
,,,script,./test.sh -f tsim/dnode/vnode_clean.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim
|
||||
,,,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim
|
||||
,,,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim
|
||||
,,,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim
|
||||
,,y,script,./test.sh -f tsim/import/basic.sim
|
||||
,,y,script,./test.sh -f tsim/import/commit.sim
|
||||
,,y,script,./test.sh -f tsim/import/large.sim
|
||||
|
@ -180,7 +180,7 @@
|
|||
,,,script,./test.sh -f tsim/mnode/basic2.sim
|
||||
,,,script,./test.sh -f tsim/mnode/basic3.sim
|
||||
,,,script,./test.sh -f tsim/mnode/basic4.sim
|
||||
#,,,script,./test.sh -f tsim/mnode/basic5.sim
|
||||
,,,script,./test.sh -f tsim/mnode/basic5.sim
|
||||
,,y,script,./test.sh -f tsim/show/basic.sim
|
||||
,,y,script,./test.sh -f tsim/table/autocreate.sim
|
||||
,,y,script,./test.sh -f tsim/table/basic1.sim
|
||||
|
@ -296,7 +296,7 @@
|
|||
,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/replica3_many.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/replica3_import.sim
|
||||
,,,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim
|
||||
,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim
|
||||
|
|
|
@ -192,7 +192,7 @@ if $data(5)[4] != ready then
|
|||
goto step5
|
||||
endi
|
||||
|
||||
print =============== step5: drop dnode 2
|
||||
print =============== step5a: drop dnode 2
|
||||
sql_error drop dnode 2
|
||||
sql drop dnode 2 force
|
||||
|
||||
|
@ -204,15 +204,23 @@ if $rows != 4 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
$x = 0
|
||||
step5a:
|
||||
$ = $x + 1
|
||||
sleep 1000
|
||||
if $x == 10 then
|
||||
print ====> dnode not online!
|
||||
return -1
|
||||
endi
|
||||
print select * from information_schema.ins_mnodes;
|
||||
sql select * from information_schema.ins_mnodes
|
||||
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
|
||||
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
|
||||
if $rows != 2 then
|
||||
return -1
|
||||
goto step5a
|
||||
endi
|
||||
if $data(1)[2] != leader then
|
||||
return -1
|
||||
goto step5a
|
||||
endi
|
||||
|
||||
sql select * from information_schema.ins_qnodes
|
||||
|
|
|
@ -206,7 +206,6 @@ endi
|
|||
|
||||
print =============== step8: stop mnode1 and drop it
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
|
||||
sql_error drop mnode on dnode 1
|
||||
|
||||
$x = 0
|
||||
step81:
|
||||
|
@ -234,42 +233,15 @@ if $leaderNum != 1 then
|
|||
endi
|
||||
|
||||
print =============== step9: start mnode1 and wait it dropped
|
||||
system sh/exec.sh -n dnode1 -s start
|
||||
sql drop mnode on dnode 1 -x step90
|
||||
step90:
|
||||
|
||||
print check mnode has leader step9a
|
||||
$x = 0
|
||||
step91:
|
||||
step9a:
|
||||
$x = $x + 1
|
||||
sleep 1000
|
||||
if $x == 10 then
|
||||
return -1
|
||||
endi
|
||||
sql select * from information_schema.ins_dnodes
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
print ===> $data30 $data31 $data32 $data33 $data34 $data35
|
||||
if $data(1)[4] != ready then
|
||||
goto step91
|
||||
endi
|
||||
if $data(2)[4] != ready then
|
||||
goto step91
|
||||
endi
|
||||
if $data(3)[4] != ready then
|
||||
goto step91
|
||||
endi
|
||||
if $data(4)[4] != ready then
|
||||
goto step91
|
||||
endi
|
||||
|
||||
$x = 0
|
||||
step92:
|
||||
$x = $x + 1
|
||||
sleep 1000
|
||||
if $x == 20 then
|
||||
return -1
|
||||
endi
|
||||
print check mnode leader
|
||||
sql select * from information_schema.ins_mnodes
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
|
@ -285,10 +257,95 @@ if $data(3)[2] == leader then
|
|||
$leaderNum = 1
|
||||
endi
|
||||
if $leaderNum != 1 then
|
||||
goto step92
|
||||
goto step9a
|
||||
endi
|
||||
|
||||
print start dnode1 step9b
|
||||
system sh/exec.sh -n dnode1 -s start
|
||||
$x = 0
|
||||
step9b:
|
||||
$x = $x + 1
|
||||
sleep 1000
|
||||
if $x == 10 then
|
||||
return -1
|
||||
endi
|
||||
print check dnode1 ready
|
||||
sql select * from information_schema.ins_dnodes
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
print ===> $data30 $data31 $data32 $data33 $data34 $data35
|
||||
if $data(1)[4] != ready then
|
||||
goto step9b
|
||||
endi
|
||||
if $data(2)[4] != ready then
|
||||
goto step9b
|
||||
endi
|
||||
if $data(3)[4] != ready then
|
||||
goto step9b
|
||||
endi
|
||||
if $data(4)[4] != ready then
|
||||
goto step9b
|
||||
endi
|
||||
|
||||
sleep 4000
|
||||
print check mnode has leader step9c
|
||||
$x = 0
|
||||
step9c:
|
||||
$x = $x + 1
|
||||
sleep 1000
|
||||
if $x == 10 then
|
||||
return -1
|
||||
endi
|
||||
print check mnode leader
|
||||
sql select * from information_schema.ins_mnodes
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
$leaderNum = 0
|
||||
if $data(1)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $data(2)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $data(3)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $leaderNum != 1 then
|
||||
goto step9c
|
||||
endi
|
||||
|
||||
print drop mnode step9d
|
||||
sql drop mnode on dnode 1
|
||||
|
||||
$x = 0
|
||||
step9d:
|
||||
$x = $x + 1
|
||||
sleep 1000
|
||||
if $x == 20 then
|
||||
return -1
|
||||
endi
|
||||
print check mnode leader
|
||||
sql select * from information_schema.ins_mnodes
|
||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05
|
||||
print ===> $data10 $data11 $data12 $data13 $data14 $data15
|
||||
print ===> $data20 $data21 $data22 $data23 $data24 $data25
|
||||
$leaderNum = 0
|
||||
if $data(1)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $data(2)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $data(3)[2] == leader then
|
||||
$leaderNum = 1
|
||||
endi
|
||||
if $leaderNum != 1 then
|
||||
goto step9d
|
||||
endi
|
||||
if $rows != 2 then
|
||||
goto step92
|
||||
goto step9d
|
||||
endi
|
||||
|
||||
print =============== stepa: create mnode1 again
|
||||
|
|
Loading…
Reference in New Issue