提交 37c193b3 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/fix/TD-19245' into fix/TD-19441

...@@ -201,14 +201,13 @@ _OVER: ...@@ -201,14 +201,13 @@ _OVER:
taosCloseFile(&pFile); taosCloseFile(&pFile);
taosMemoryFree(content); taosMemoryFree(content);
if (ppVnodes != NULL) {
for (int32_t i = 0; i < numOfVnodes; ++i) { for (int32_t i = 0; i < numOfVnodes; ++i) {
SVnodeObj *pVnode = ppVnodes[i]; SVnodeObj *pVnode = ppVnodes[i];
if (pVnode != NULL) { if (pVnode != NULL) {
vmReleaseVnode(pMgmt, pVnode); vmReleaseVnode(pMgmt, pVnode);
} }
} }
if (ppVnodes != NULL) {
taosMemoryFree(ppVnodes); taosMemoryFree(ppVnodes);
} }
......
...@@ -87,7 +87,7 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) { ...@@ -87,7 +87,7 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) {
SSdbRaw *pRaw = mndMnodeActionEncode(&mnodeObj); SSdbRaw *pRaw = mndMnodeActionEncode(&mnodeObj);
if (pRaw == NULL) return -1; if (pRaw == NULL) return -1;
sdbSetRawStatus(pRaw, SDB_STATUS_READY); (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
mInfo("mnode:%d, will be created when deploying, raw:%p", mnodeObj.id, pRaw); mInfo("mnode:%d, will be created when deploying, raw:%p", mnodeObj.id, pRaw);
......
...@@ -1532,10 +1532,9 @@ _OVER: ...@@ -1532,10 +1532,9 @@ _OVER:
int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, SArray *pArray) { int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, SVgObj *pVgroup, SArray *pArray) {
if (pVgroup->replica <= 0 || pVgroup->replica == pDb->cfg.replications) { if (pVgroup->replica <= 0 || pVgroup->replica == pDb->cfg.replications) {
if (mndAddAlterVnodeAction(pMnode, pTrans, pDb, pVgroup, TDMT_VND_ALTER_CONFIG) != 0) { return mndAddAlterVnodeAction(pMnode, pTrans, pDb, pVgroup, TDMT_VND_ALTER_CONFIG);
return -1;
} }
} else {
SVgObj newVgroup = {0}; SVgObj newVgroup = {0};
memcpy(&newVgroup, pVgroup, sizeof(SVgObj)); memcpy(&newVgroup, pVgroup, sizeof(SVgObj));
mndTransSetSerial(pTrans); mndTransSetSerial(pTrans);
...@@ -1591,7 +1590,6 @@ int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, S ...@@ -1591,7 +1590,6 @@ int32_t mndBuildAlterVgroupAction(SMnode *pMnode, STrans *pTrans, SDbObj *pDb, S
} }
(void)sdbSetRawStatus(pVgRaw, SDB_STATUS_READY); (void)sdbSetRawStatus(pVgRaw, SDB_STATUS_READY);
} }
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册