Skip to content

Commit

Permalink
Merge pull request #25257 from taosdata/ENH/TS-4595-3.0
Browse files Browse the repository at this point in the history
enh: not to touch meta data during balance vgroup leader
  • Loading branch information
hzcheng committed Apr 3, 2024
2 parents 4ec961f + 018d388 commit 5440471
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions source/dnode/mnode/impl/src/mndVgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2342,24 +2342,7 @@ int32_t mndAddVgroupBalanceToTrans(SMnode *pMnode, SVgObj *pVgroup, STrans *pTra
return -1;
}

if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, pVgroup) != 0) {
mError("trans:%d, vgid:%d failed to be balanced to dnode:%d", pTrans->id, vgid, dnodeId);
return -1;
}

mndReleaseDb(pMnode, pDb);

SSdbRaw *pRaw = mndVgroupActionEncode(pVgroup);
if (pRaw == NULL) {
mError("trans:%d, vgid:%d failed to encode action to dnode:%d", pTrans->id, vgid, dnodeId);
return -1;
}
if (mndTransAppendCommitlog(pTrans, pRaw) != 0) {
sdbFreeRaw(pRaw);
mError("trans:%d, vgid:%d failed to append commit log dnode:%d", pTrans->id, vgid, dnodeId);
return -1;
}
(void)sdbSetRawStatus(pRaw, SDB_STATUS_READY);
} else {
mInfo("trans:%d, vgid:%d cant be balanced to dnode:%d, exist:%d, online:%d", pTrans->id, vgid, dnodeId, exist,
online);
Expand Down

0 comments on commit 5440471

Please sign in to comment.