diff --git a/src/mnode/src/mgmtTable.c b/src/mnode/src/mgmtTable.c index db5bcfbe62cf698eee9ff3f5ee7555ae2551b197..3e3b16fa9da9984c0894df3a6087161b8b440497 100644 --- a/src/mnode/src/mgmtTable.c +++ b/src/mnode/src/mgmtTable.c @@ -1460,15 +1460,15 @@ static void mgmtProcessCreateChildTableMsg(SQueuedMsg *pMsg) { return; } - int32_t sid = taosAllocateId(pVgroup->idPool); - if (sid <= 0) { - mTrace("tables:%s, no enough sid in vgId:%d", pCreate->tableId, pVgroup->vgId); - mgmtCreateVgroup(mgmtCloneQueuedMsg(pMsg), pMsg->pDb); - return; - } - if (pMsg->retry == 0) { if (pMsg->pTable == NULL) { + int32_t sid = taosAllocateId(pVgroup->idPool); + if (sid <= 0) { + mTrace("tables:%s, no enough sid in vgId:%d", pCreate->tableId, pVgroup->vgId); + mgmtCreateVgroup(mgmtCloneQueuedMsg(pMsg), pMsg->pDb); + return; + } + pMsg->pTable = (STableObj *)mgmtDoCreateChildTable(pCreate, pVgroup, sid); mgmtIncTableRef(pMsg->pTable); }