提交 8f6aaf0a 编写于 作者: S Shengliang Guan

fix: donot retry if error code not match retry code

上级 ed7e614a
...@@ -1308,11 +1308,11 @@ static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) { ...@@ -1308,11 +1308,11 @@ static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) {
if (pTrans->policy == TRN_POLICY_ROLLBACK) { if (pTrans->policy == TRN_POLICY_ROLLBACK) {
if (pTrans->lastAction != 0) { if (pTrans->lastAction != 0) {
STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->lastAction); STransAction *pAction = taosArrayGet(pTrans->redoActions, pTrans->lastAction);
if (pAction->retryCode != 0 && pAction->retryCode != pAction->errCode) { if (pAction->retryCode != 0 && pAction->retryCode == pAction->errCode) {
if (pTrans->failedTimes < 6) { if (pTrans->failedTimes < 6) {
mError("trans:%d, stage keep on redoAction since action:%d code:0x%x not 0x%x, failedTimes:%d", pTrans->id, mError("trans:%d, stage keep on redoAction since action:%d code:0x%x not 0x%x, failedTimes:%d", pTrans->id,
pTrans->lastAction, pTrans->code, pAction->retryCode, pTrans->failedTimes); pTrans->lastAction, pTrans->code, pAction->retryCode, pTrans->failedTimes);
taosMsleep(100); taosMsleep(1000);
continueExec = true; continueExec = true;
return true; return true;
} }
......
...@@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start ...@@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start
sql connect sql connect
print =============== conflict stb print =============== conflict stb
sql create database db vgroups 1; sql create database db vgroups 4;
sql use db; sql use db;
sql create table stb (ts timestamp, i int) tags (j int); sql create table stb (ts timestamp, i int) tags (j int);
sql_error create table stb using stb tags (1); sql_error create table stb using stb tags (1);
...@@ -16,6 +16,9 @@ sql_error create table ctb (ts timestamp, i int) tags (j int); ...@@ -16,6 +16,9 @@ sql_error create table ctb (ts timestamp, i int) tags (j int);
sql create table ntb (ts timestamp, i int); sql create table ntb (ts timestamp, i int);
sql_error create table ntb (ts timestamp, i int) tags (j int); sql_error create table ntb (ts timestamp, i int) tags (j int);
sql drop table ntb
sql create table ntb (ts timestamp, i int) tags (j int);
sql drop database db sql drop database db
print =============== create database d1 print =============== create database d1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册