balance: remove unused pVgroup->lbTime checking
This commit is contained in:
parent
935d41b1f7
commit
b0fb8f9dc6
|
@ -220,10 +220,6 @@ int32_t bnAllocVnodes(SVgObj *pVgroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool bnCheckVgroupReady(SVgObj *pVgroup, SVnodeGid *pRmVnode) {
|
static bool bnCheckVgroupReady(SVgObj *pVgroup, SVnodeGid *pRmVnode) {
|
||||||
if (pVgroup->lbTime + 5 * tsStatusInterval > tsAccessSquence) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t rmVnodeVer = 0;
|
int32_t rmVnodeVer = 0;
|
||||||
for (int32_t i = 0; i < pVgroup->numOfVnodes; ++i) {
|
for (int32_t i = 0; i < pVgroup->numOfVnodes; ++i) {
|
||||||
SVnodeGid *pVnode = pVgroup->vnodeGid + i;
|
SVnodeGid *pVnode = pVgroup->vnodeGid + i;
|
||||||
|
|
|
@ -101,12 +101,12 @@ static void bnProcessTimer(void *handle, void *tmrId) {
|
||||||
if (!sdbIsMaster()) return;
|
if (!sdbIsMaster()) return;
|
||||||
if (tsBnThread.stop) return;
|
if (tsBnThread.stop) return;
|
||||||
|
|
||||||
if (handle == NULL) {
|
tsBnThread.timer = NULL;
|
||||||
tsBnThread.timer = NULL;
|
bnStartTimer(-1);
|
||||||
++tsAccessSquence;
|
bnCheckStatus();
|
||||||
|
|
||||||
bnStartTimer(-1);
|
if (handle == NULL) {
|
||||||
bnCheckStatus();
|
++tsAccessSquence;
|
||||||
|
|
||||||
if (tsAccessSquence % tsBalanceInterval == 0) {
|
if (tsAccessSquence % tsBalanceInterval == 0) {
|
||||||
mDebug("balance function is scheduled by timer");
|
mDebug("balance function is scheduled by timer");
|
||||||
|
@ -131,5 +131,5 @@ void bnStartTimer(int32_t mseconds) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void bnNotify() {
|
void bnNotify() {
|
||||||
bnStartTimer(10);
|
bnStartTimer(500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,7 +630,7 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t numOfMnodes = mnodeGetMnodesNum();
|
int32_t numOfMnodes = mnodeGetMnodesNum();
|
||||||
if (numOfMnodes < tsNumOfMnodes && numOfMnodes < mnodeGetOnlineDnodesNum()) {
|
if (numOfMnodes < tsNumOfMnodes && numOfMnodes < mnodeGetOnlineDnodesNum() && !pDnode->isMgmt) {
|
||||||
bnNotify();
|
bnNotify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue