minor changes
This commit is contained in:
parent
f4bb5d06c8
commit
1d5a97cffb
|
@ -204,7 +204,7 @@ static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOldStb, SStbObj *pNewStb
|
||||||
SStbObj *mndAcquireStb(SMnode *pMnode, char *stbName) {
|
SStbObj *mndAcquireStb(SMnode *pMnode, char *stbName) {
|
||||||
SSdb *pSdb = pMnode->pSdb;
|
SSdb *pSdb = pMnode->pSdb;
|
||||||
SStbObj *pStb = sdbAcquire(pSdb, SDB_STB, stbName);
|
SStbObj *pStb = sdbAcquire(pSdb, SDB_STB, stbName);
|
||||||
if (pStb == NULL) {
|
if (pStb == NULL && terrno == TSDB_CODE_SDB_OBJ_NOT_THERE) {
|
||||||
terrno = TSDB_CODE_MND_STB_NOT_EXIST;
|
terrno = TSDB_CODE_MND_STB_NOT_EXIST;
|
||||||
}
|
}
|
||||||
return pStb;
|
return pStb;
|
||||||
|
@ -513,9 +513,11 @@ static int32_t mndProcesSMCreateStbReq(SMnodeMsg *pMsg) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
terrno = TSDB_CODE_MND_STB_ALREADY_EXIST;
|
terrno = TSDB_CODE_MND_STB_ALREADY_EXIST;
|
||||||
mError("db:%s, failed to create since %s", pCreate->name, terrstr());
|
mError("stb:%s, failed to create since %s", pCreate->name, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else if (terrno != TSDB_CODE_MND_STB_NOT_EXIST) {
|
||||||
|
mError("stb:%s, failed to create since %s", pCreate->name, terrstr());
|
||||||
}
|
}
|
||||||
|
|
||||||
// topic should have different name with stb
|
// topic should have different name with stb
|
||||||
|
|
|
@ -825,7 +825,7 @@ static bool mndTransPerformUndoActionStage(SMnode *pMnode, STrans *pTrans) {
|
||||||
mDebug("trans:%d, stage from undoAction to undoLog", pTrans->id);
|
mDebug("trans:%d, stage from undoAction to undoLog", pTrans->id);
|
||||||
continueExec = true;
|
continueExec = true;
|
||||||
} else if (code == TSDB_CODE_MND_ACTION_IN_PROGRESS) {
|
} else if (code == TSDB_CODE_MND_ACTION_IN_PROGRESS) {
|
||||||
mError("trans:%d, stage keep on undoAction since %s", pTrans->id, tstrerror(code));
|
mDebug("trans:%d, stage keep on undoAction since %s", pTrans->id, tstrerror(code));
|
||||||
continueExec = false;
|
continueExec = false;
|
||||||
} else {
|
} else {
|
||||||
pTrans->failedTimes++;
|
pTrans->failedTimes++;
|
||||||
|
|
|
@ -58,4 +58,42 @@ if $data03 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
print ========== stop dnode2
|
||||||
|
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
|
||||||
|
|
||||||
|
print =============== create database
|
||||||
|
sql_error drop database d1
|
||||||
|
|
||||||
|
print ========== start dnode2
|
||||||
|
system sh/exec.sh -n dnode2 -s start
|
||||||
|
|
||||||
|
print =============== re-create database
|
||||||
|
$x = 0
|
||||||
|
re-create2:
|
||||||
|
$x = $x + 1
|
||||||
|
sleep 1000
|
||||||
|
if $x == 10 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
sql create database d1 vgroups 5 -x re-create2
|
||||||
|
|
||||||
|
sql show databases
|
||||||
|
if $rows != 1 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
if $data00 != d1 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
if $data02 != 5 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
if $data03 != 0 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
system sh/exec.sh -n dnode2 -s stop -x SIGINT
|
Loading…
Reference in New Issue