提交 b536877f 编写于 作者: S Shengliang Guan

TD-1038 TD-1040

上级 41f46053
......@@ -458,6 +458,7 @@ void mnodeRemoveVgroupFromDb(SVgObj *pVgroup) {
pDb->vgList[v2] = pDb->vgList[v2 + 1];
}
pDb->numOfVgroups--;
pDb->vgList[pDb->numOfVgroups] = NULL;
break;
}
}
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册