Merge pull request #4829 from taosdata/fix/TD-2647
[TD-2647]<fix>: fix batch create table retry processing
This commit is contained in:
commit
30b01d543a
|
@ -829,19 +829,19 @@ static int32_t mnodeProcessBatchCreateTableMsg(SMnodeMsg *pMsg) {
|
||||||
if (code == TSDB_CODE_SUCCESS || code == TSDB_CODE_MND_TABLE_ALREADY_EXIST) {
|
if (code == TSDB_CODE_SUCCESS || code == TSDB_CODE_MND_TABLE_ALREADY_EXIST) {
|
||||||
++pMsg->pBatchMasterMsg->successed;
|
++pMsg->pBatchMasterMsg->successed;
|
||||||
mnodeDestroySubMsg(pMsg);
|
mnodeDestroySubMsg(pMsg);
|
||||||
}
|
} else if (code == TSDB_CODE_MND_ACTION_NEED_REPROCESSED) {
|
||||||
|
|
||||||
if (code != TSDB_CODE_MND_ACTION_IN_PROGRESS) {
|
|
||||||
mnodeDestroySubMsg(pMsg);
|
|
||||||
return code;
|
return code;
|
||||||
|
} else if (code != TSDB_CODE_MND_ACTION_IN_PROGRESS) {
|
||||||
|
++pMsg->pBatchMasterMsg->received;
|
||||||
|
mnodeDestroySubMsg(pMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||||
>= pMsg->pBatchMasterMsg->expected) {
|
>= pMsg->pBatchMasterMsg->expected) {
|
||||||
return code;
|
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, TSDB_CODE_SUCCESS);
|
||||||
} else {
|
|
||||||
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||||
} else { // batch master replay, reprocess the whole batch
|
} else { // batch master replay, reprocess the whole batch
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue