Merge pull request #13046 from taosdata/fix/dnode
fix: msg redirect while mnode replica large than 0
This commit is contained in:
commit
2aa83680ff
|
@ -928,7 +928,8 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
|
||||||
*/
|
*/
|
||||||
tmsg_t msgType = pCtx->msgType;
|
tmsg_t msgType = pCtx->msgType;
|
||||||
if ((pTransInst->retry != NULL && (pTransInst->retry(pResp->code))) ||
|
if ((pTransInst->retry != NULL && (pTransInst->retry(pResp->code))) ||
|
||||||
(pResp->code == TSDB_CODE_RPC_NETWORK_UNAVAIL)) {
|
(pResp->code == TSDB_CODE_RPC_NETWORK_UNAVAIL || pResp->code == TSDB_CODE_APP_NOT_READY ||
|
||||||
|
pResp->code == TSDB_CODE_NODE_NOT_DEPLOYED || pResp->code == TSDB_CODE_SYN_NOT_LEADER)) {
|
||||||
pMsg->sent = 0;
|
pMsg->sent = 0;
|
||||||
pMsg->st = taosGetTimestampUs();
|
pMsg->st = taosGetTimestampUs();
|
||||||
pCtx->retryCount += 1;
|
pCtx->retryCount += 1;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
# ---- mnode
|
# ---- mnode
|
||||||
#./test.sh -f tsim/mnode/basic1.sim
|
#./test.sh -f tsim/mnode/basic1.sim
|
||||||
#./test.sh -f tsim/mnode/basic2.sim
|
./test.sh -f tsim/mnode/basic2.sim
|
||||||
|
|
||||||
# ---- show
|
# ---- show
|
||||||
./test.sh -f tsim/show/basic.sim
|
./test.sh -f tsim/show/basic.sim
|
||||||
|
|
|
@ -40,7 +40,7 @@ print =============== create mnode 2
|
||||||
sql create mnode on dnode 2
|
sql create mnode on dnode 2
|
||||||
|
|
||||||
$x = 0
|
$x = 0
|
||||||
step1:
|
step2:
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
sleep 1000
|
sleep 1000
|
||||||
if $x == 20 then
|
if $x == 20 then
|
||||||
|
@ -63,7 +63,7 @@ if $data(2)[0] != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data(2)[2] != FOLLOWER then
|
if $data(2)[2] != FOLLOWER then
|
||||||
goto step1
|
goto step2
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== create user
|
print =============== create user
|
||||||
|
@ -103,17 +103,25 @@ if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql show dnodes
|
$x = 0
|
||||||
|
step3:
|
||||||
|
$x = $x + 1
|
||||||
|
sleep 500
|
||||||
|
if $x == 20 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
sql show dnodes -x step3
|
||||||
if $data(1)[4] != ready then
|
if $data(1)[4] != ready then
|
||||||
return -1
|
goto step3
|
||||||
endi
|
endi
|
||||||
if $data(2)[4] != ready then
|
if $data(2)[4] != ready then
|
||||||
return -1
|
goto step3
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== insert data
|
print =============== insert data
|
||||||
sql create table db.stb (ts timestamp, i int) tags (j int)
|
#sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd"
|
||||||
sql create table db.ctb using db.stb tags(1);
|
#sql create table db.ctb using db.stb tags(101, 102, "103")
|
||||||
|
#sql insert into db.ctb values(now, 1, "2")
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop
|
system sh/exec.sh -n dnode1 -s stop
|
||||||
system sh/exec.sh -n dnode2 -s stop
|
system sh/exec.sh -n dnode2 -s stop
|
Loading…
Reference in New Issue