commit
a468a6d51e
|
@ -1758,6 +1758,9 @@ static int32_t mnodeDoCreateChildTable(SMnodeMsg *pMsg, int32_t tid) {
|
||||||
pMsg->pTable = NULL;
|
pMsg->pTable = NULL;
|
||||||
mError("app:%p:%p, table:%s, failed to create, reason:%s", pMsg->rpcMsg.ahandle, pMsg, pCreate->tableId,
|
mError("app:%p:%p, table:%s, failed to create, reason:%s", pMsg->rpcMsg.ahandle, pMsg, pCreate->tableId,
|
||||||
tstrerror(code));
|
tstrerror(code));
|
||||||
|
} else {
|
||||||
|
mDebug("app:%p:%p, table:%s, allocated in vgroup, vgId:%d sid:%d uid:%" PRIu64, pMsg->rpcMsg.ahandle, pMsg,
|
||||||
|
pTable->info.tableId, pVgroup->vgId, pTable->sid, pTable->uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
@ -1790,9 +1793,6 @@ static int32_t mnodeProcessCreateChildTableMsg(SMnodeMsg *pMsg) {
|
||||||
pMsg->pVgroup = pVgroup;
|
pMsg->pVgroup = pVgroup;
|
||||||
mnodeIncVgroupRef(pVgroup);
|
mnodeIncVgroupRef(pVgroup);
|
||||||
|
|
||||||
mDebug("app:%p:%p, table:%s, allocated in vgroup, vgId:%d sid:%d", pMsg->rpcMsg.ahandle, pMsg, pCreate->tableId,
|
|
||||||
pVgroup->vgId, sid);
|
|
||||||
|
|
||||||
return mnodeDoCreateChildTable(pMsg, sid);
|
return mnodeDoCreateChildTable(pMsg, sid);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2348,6 +2348,15 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
|
||||||
if (sdbCheckRowDeleted(tsChildTableSdb, pTable)) {
|
if (sdbCheckRowDeleted(tsChildTableSdb, pTable)) {
|
||||||
mDebug("app:%p:%p, table:%s, create table rsp received, but a deleting opertion incoming, vgId:%d sid:%d uid:%" PRIu64,
|
mDebug("app:%p:%p, table:%s, create table rsp received, but a deleting opertion incoming, vgId:%d sid:%d uid:%" PRIu64,
|
||||||
mnodeMsg->rpcMsg.ahandle, mnodeMsg, pTable->info.tableId, pTable->vgId, pTable->sid, pTable->uid);
|
mnodeMsg->rpcMsg.ahandle, mnodeMsg, pTable->info.tableId, pTable->vgId, pTable->sid, pTable->uid);
|
||||||
|
|
||||||
|
// if the vgroup is already dropped from hash, it can't be accquired by pTable->vgId
|
||||||
|
// so the refCount of vgroup can not be decreased
|
||||||
|
SVgObj *pVgroup = mnodeGetVgroup(pTable->vgId);
|
||||||
|
if (pVgroup == NULL) {
|
||||||
|
mnodeRemoveTableFromVgroup(pVgroup, pTable);
|
||||||
|
}
|
||||||
|
mnodeDecVgroupRef(pVgroup);
|
||||||
|
|
||||||
mnodeSendDropChildTableMsg(mnodeMsg, false);
|
mnodeSendDropChildTableMsg(mnodeMsg, false);
|
||||||
rpcMsg->code = TSDB_CODE_SUCCESS;
|
rpcMsg->code = TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue