Merge pull request #5669 from taosdata/fix/TD-3657
[TD-3657]<fix>: sdbUpdateMnodeRoles before check mnodeAllOnline
This commit is contained in:
commit
f5c153c65a
|
@ -628,6 +628,11 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
|
||||||
bnNotify();
|
bnNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tsEnableBalance) {
|
||||||
|
int32_t numOfMnodes = mnodeGetMnodesNum();
|
||||||
|
if (numOfMnodes < tsNumOfMnodes) bnNotify();
|
||||||
|
}
|
||||||
|
|
||||||
if (openVnodes != pDnode->openVnodes) {
|
if (openVnodes != pDnode->openVnodes) {
|
||||||
mnodeCheckUnCreatedVgroup(pDnode, pStatus->load, openVnodes);
|
mnodeCheckUnCreatedVgroup(pDnode, pStatus->load, openVnodes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,6 +381,8 @@ static bool mnodeAllOnline() {
|
||||||
void *pIter = NULL;
|
void *pIter = NULL;
|
||||||
bool allOnline = true;
|
bool allOnline = true;
|
||||||
|
|
||||||
|
sdbUpdateMnodeRoles();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
SMnodeObj *pMnode = NULL;
|
SMnodeObj *pMnode = NULL;
|
||||||
pIter = mnodeGetNextMnode(pIter, &pMnode);
|
pIter = mnodeGetNextMnode(pIter, &pMnode);
|
||||||
|
|
|
@ -1372,7 +1372,7 @@ static void syncMonitorNodeRole(void *param, void *tmrId) {
|
||||||
if (/*pPeer->role > TAOS_SYNC_ROLE_UNSYNCED && */ nodeRole > TAOS_SYNC_ROLE_UNSYNCED) continue;
|
if (/*pPeer->role > TAOS_SYNC_ROLE_UNSYNCED && */ nodeRole > TAOS_SYNC_ROLE_UNSYNCED) continue;
|
||||||
if (/*pPeer->sstatus > TAOS_SYNC_STATUS_INIT || */ nodeSStatus > TAOS_SYNC_STATUS_INIT) continue;
|
if (/*pPeer->sstatus > TAOS_SYNC_STATUS_INIT || */ nodeSStatus > TAOS_SYNC_STATUS_INIT) continue;
|
||||||
|
|
||||||
sDebug("%s, check roles since self:%s sstatus:%s, peer:%s sstatus:%s", pPeer->id, syncRole[pPeer->role],
|
sDebug("%s, check roles since peer:%s sstatus:%s, self:%s sstatus:%s", pPeer->id, syncRole[pPeer->role],
|
||||||
syncStatus[pPeer->sstatus], syncRole[nodeRole], syncStatus[nodeSStatus]);
|
syncStatus[pPeer->sstatus], syncRole[nodeRole], syncStatus[nodeSStatus]);
|
||||||
syncSendPeersStatusMsgToPeer(pPeer, 1, SYNC_STATUS_CHECK_ROLE, syncGenTranId());
|
syncSendPeersStatusMsgToPeer(pPeer, 1, SYNC_STATUS_CHECK_ROLE, syncGenTranId());
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue