diff --git a/src/mnode/src/mnodeDb.c b/src/mnode/src/mnodeDb.c index c7e3085e69285570e7b6700507c4b41a62c926e4..48acc6787c0d601a1efceb182ea0da48da407a13 100644 --- a/src/mnode/src/mnodeDb.c +++ b/src/mnode/src/mnodeDb.c @@ -458,6 +458,7 @@ void mnodeRemoveVgroupFromDb(SVgObj *pVgroup) { pDb->vgList[v2] = pDb->vgList[v2 + 1]; } pDb->numOfVgroups--; + pDb->vgList[pDb->numOfVgroups] = NULL; break; } } diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index 7ae8b5670ca7be60c4f4f5633cedf27c5a1f0e1b..301dd41cbc5e08917b5adf27643822da574a5abe 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -494,7 +494,7 @@ static int32_t sdbInsertHash(SSdbTable *pTable, SSdbOper *pOper) { sdbDeleteHash(pTable, pOper); } - return code; + return TSDB_CODE_SUCCESS; } static int32_t sdbDeleteHash(SSdbTable *pTable, SSdbOper *pOper) { diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index 14cc052c4995e56e17ecb5aca1d2cde181fa3a50..5837aed25908751e7925276ed87ba6af9291af29 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -2359,6 +2359,8 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) { mnodeSendDropChildTableMsg(mnodeMsg, false); rpcMsg->code = TSDB_CODE_SUCCESS; + dnodeSendRpcMnodeWriteRsp(mnodeMsg, rpcMsg->code); + return; } if (rpcMsg->code == TSDB_CODE_SUCCESS || rpcMsg->code == TSDB_CODE_TDB_TABLE_ALREADY_EXIST) { diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index 0c5df5aa1127f215eea6b69fb917e6504c80b332..942372024124791c1cd9a8242ce381cc03dedd09 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -449,6 +449,12 @@ int32_t mnodeGetAvailableVgroup(SMnodeMsg *pMsg, SVgObj **ppVgroup, int32_t *pSi } } + if (pDb->numOfVgroups < 1) { + mDebug("app:%p:%p, db:%s, failed create new vgroup since:%s, numOfVgroups:%d maxVgroupsPerDb:%d ", + pMsg->rpcMsg.ahandle, pMsg, pDb->name, tstrerror(code), pDb->numOfVgroups, maxVgroupsPerDb); + return code; + } + SVgObj *pVgroup = pDb->vgList[0]; if (pVgroup == NULL) { pthread_mutex_unlock(&pDb->mutex); diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index 8c6d6243eb4f677e9a5436b4449e07df011d2b52..e2f061445571a41ad2e9ce9aa60070cf9a41fcee 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -241,6 +241,7 @@ void taosCloseQset(taos_qset param) { if (param == NULL) return; STaosQset *qset = (STaosQset *)param; +#if 0 // remove all the queues from qset pthread_mutex_lock(&qset->mutex); while (qset->head) { @@ -251,6 +252,7 @@ void taosCloseQset(taos_qset param) { queue->next = NULL; } pthread_mutex_unlock(&qset->mutex); +#endif pthread_mutex_destroy(&qset->mutex); tsem_destroy(&qset->sem);