Merge pull request #5356 from taosdata/fix/TD-3171
[TD-3171]<fix>: response error code if any
This commit is contained in:
commit
8d6cf54ad4
|
@ -832,12 +832,13 @@ static int32_t mnodeProcessBatchCreateTableMsg(SMnodeMsg *pMsg) {
|
|||
return code;
|
||||
} else if (code != TSDB_CODE_MND_ACTION_IN_PROGRESS) {
|
||||
++pMsg->pBatchMasterMsg->received;
|
||||
pMsg->pBatchMasterMsg->code = code;
|
||||
mnodeDestroySubMsg(pMsg);
|
||||
}
|
||||
|
||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||
>= pMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, TSDB_CODE_SUCCESS);
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, pMsg->pBatchMasterMsg->code);
|
||||
}
|
||||
|
||||
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||
|
@ -1908,7 +1909,8 @@ static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
|
|||
sdbDeleteRow(&desc);
|
||||
|
||||
if (pMsg->pBatchMasterMsg) {
|
||||
++pMsg->pBatchMasterMsg->successed;
|
||||
++pMsg->pBatchMasterMsg->received;
|
||||
pMsg->pBatchMasterMsg->code = code;
|
||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||
>= pMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, code);
|
||||
|
@ -2690,6 +2692,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
|
|||
|
||||
if (pMsg->pBatchMasterMsg) {
|
||||
++pMsg->pBatchMasterMsg->received;
|
||||
pMsg->pBatchMasterMsg->code = code;
|
||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||
>= pMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, code);
|
||||
|
@ -2728,6 +2731,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
|
|||
|
||||
if (pMsg->pBatchMasterMsg) {
|
||||
++pMsg->pBatchMasterMsg->received;
|
||||
pMsg->pBatchMasterMsg->code = rpcMsg->code;
|
||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||
>= pMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, rpcMsg->code);
|
||||
|
|
|
@ -537,6 +537,7 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) {
|
|||
|
||||
if (pMsg->pBatchMasterMsg) {
|
||||
++pMsg->pBatchMasterMsg->received;
|
||||
pMsg->pBatchMasterMsg->code = pMsg->code;
|
||||
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||
>= pMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, pMsg->code);
|
||||
|
@ -1002,6 +1003,7 @@ static void mnodeProcessCreateVnodeRsp(SRpcMsg *rpcMsg) {
|
|||
|
||||
if (mnodeMsg->pBatchMasterMsg) {
|
||||
++mnodeMsg->pBatchMasterMsg->received;
|
||||
mnodeMsg->pBatchMasterMsg->code = code;
|
||||
if (mnodeMsg->pBatchMasterMsg->successed + mnodeMsg->pBatchMasterMsg->received
|
||||
>= mnodeMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(mnodeMsg->pBatchMasterMsg, code);
|
||||
|
@ -1024,6 +1026,7 @@ static void mnodeProcessCreateVnodeRsp(SRpcMsg *rpcMsg) {
|
|||
|
||||
if (mnodeMsg->pBatchMasterMsg) {
|
||||
++mnodeMsg->pBatchMasterMsg->received;
|
||||
mnodeMsg->pBatchMasterMsg->code = mnodeMsg->code;
|
||||
if (mnodeMsg->pBatchMasterMsg->successed + mnodeMsg->pBatchMasterMsg->received
|
||||
>= mnodeMsg->pBatchMasterMsg->expected) {
|
||||
dnodeSendRpcMWriteRsp(mnodeMsg->pBatchMasterMsg, mnodeMsg->code);
|
||||
|
|
Loading…
Reference in New Issue