Merge pull request #5297 from taosdata/fix/TD-3107
[TD-3107]<fix>: handle *Too many sync fwd infos* error crash with bat…
This commit is contained in:
commit
ffc046ecd3
|
@ -145,6 +145,14 @@ void dnodeSendRpcMWriteRsp(void *pMsg, int32_t code) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dTrace("msg:%p, app:%p type:%s master:%p will be responsed", pWrite, pWrite->rpcMsg.ahandle,
|
||||||
|
taosMsg[pWrite->rpcMsg.msgType], pWrite->pBatchMasterMsg);
|
||||||
|
if (pWrite->pBatchMasterMsg && pWrite != pWrite->pBatchMasterMsg) {
|
||||||
|
dError("msg:%p, app:%p type:%s master:%p sub message should not response!", pWrite, pWrite->rpcMsg.ahandle,
|
||||||
|
taosMsg[pWrite->rpcMsg.msgType], pWrite->pBatchMasterMsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SRpcMsg rpcRsp = {
|
SRpcMsg rpcRsp = {
|
||||||
.handle = pWrite->rpcMsg.handle,
|
.handle = pWrite->rpcMsg.handle,
|
||||||
.pCont = pWrite->rpcRsp.rsp,
|
.pCont = pWrite->rpcRsp.rsp,
|
||||||
|
|
|
@ -777,11 +777,11 @@ static int32_t mnodeValidateCreateTableMsg(SCreateTableMsg *pCreateTable, SMnode
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pCreateTable->numOfTags != 0) {
|
if (pCreateTable->numOfTags != 0) {
|
||||||
mDebug("msg:%p, app:%p table:%s, create stable msg is received from thandle:%p", pMsg, pMsg->rpcMsg.ahandle,
|
mDebug("msg:%p, app:%p table:%s, batch create stable msg is received from thandle:%p", pMsg, pMsg->rpcMsg.ahandle,
|
||||||
pCreateTable->tableName, pMsg->rpcMsg.handle);
|
pCreateTable->tableName, pMsg->rpcMsg.handle);
|
||||||
return mnodeProcessCreateSuperTableMsg(pMsg);
|
return mnodeProcessCreateSuperTableMsg(pMsg);
|
||||||
} else {
|
} else {
|
||||||
mDebug("msg:%p, app:%p table:%s, create ctable msg is received from thandle:%p", pMsg, pMsg->rpcMsg.ahandle,
|
mDebug("msg:%p, app:%p table:%s, batch create ctable msg is received from thandle:%p", pMsg, pMsg->rpcMsg.ahandle,
|
||||||
pCreateTable->tableName, pMsg->rpcMsg.handle);
|
pCreateTable->tableName, pMsg->rpcMsg.handle);
|
||||||
return mnodeProcessCreateChildTableMsg(pMsg);
|
return mnodeProcessCreateChildTableMsg(pMsg);
|
||||||
}
|
}
|
||||||
|
@ -1904,6 +1904,19 @@ static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
|
||||||
pMsg->rpcMsg.ahandle, pTable->info.tableId, pTable->tid, pTable->uid, tstrerror(code));
|
pMsg->rpcMsg.ahandle, pTable->info.tableId, pTable->tid, pTable->uid, tstrerror(code));
|
||||||
SSdbRow desc = {.type = SDB_OPER_GLOBAL, .pObj = pTable, .pTable = tsChildTableSdb};
|
SSdbRow desc = {.type = SDB_OPER_GLOBAL, .pObj = pTable, .pTable = tsChildTableSdb};
|
||||||
sdbDeleteRow(&desc);
|
sdbDeleteRow(&desc);
|
||||||
|
|
||||||
|
if (pMsg->pBatchMasterMsg) {
|
||||||
|
++pMsg->pBatchMasterMsg->successed;
|
||||||
|
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||||
|
>= pMsg->pBatchMasterMsg->expected) {
|
||||||
|
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, code);
|
||||||
|
}
|
||||||
|
|
||||||
|
mnodeDestroySubMsg(pMsg);
|
||||||
|
|
||||||
|
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||||
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,6 +534,19 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) {
|
||||||
tstrerror(code));
|
tstrerror(code));
|
||||||
SSdbRow desc = {.type = SDB_OPER_GLOBAL, .pObj = pVgroup, .pTable = tsVgroupSdb};
|
SSdbRow desc = {.type = SDB_OPER_GLOBAL, .pObj = pVgroup, .pTable = tsVgroupSdb};
|
||||||
sdbDeleteRow(&desc);
|
sdbDeleteRow(&desc);
|
||||||
|
|
||||||
|
if (pMsg->pBatchMasterMsg) {
|
||||||
|
++pMsg->pBatchMasterMsg->received;
|
||||||
|
if (pMsg->pBatchMasterMsg->successed + pMsg->pBatchMasterMsg->received
|
||||||
|
>= pMsg->pBatchMasterMsg->expected) {
|
||||||
|
dnodeSendRpcMWriteRsp(pMsg->pBatchMasterMsg, pMsg->code);
|
||||||
|
}
|
||||||
|
|
||||||
|
mnodeDestroySubMsg(pMsg);
|
||||||
|
|
||||||
|
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||||
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
} else {
|
} else {
|
||||||
mInfo("msg:%p, app:%p vgId:%d, is created in sdb, db:%s replica:%d", pMsg, pMsg->rpcMsg.ahandle, pVgroup->vgId,
|
mInfo("msg:%p, app:%p vgId:%d, is created in sdb, db:%s replica:%d", pMsg, pMsg->rpcMsg.ahandle, pVgroup->vgId,
|
||||||
|
|
Loading…
Reference in New Issue