提交 b0fb8f9d 编写于 作者: M Minglei Jin

balance: remove unused pVgroup->lbTime checking

上级 935d41b1
...@@ -220,10 +220,6 @@ int32_t bnAllocVnodes(SVgObj *pVgroup) { ...@@ -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,13 +101,13 @@ static void bnProcessTimer(void *handle, void *tmrId) { ...@@ -101,13 +101,13 @@ static void bnProcessTimer(void *handle, void *tmrId) {
if (!sdbIsMaster()) return; if (!sdbIsMaster()) return;
if (tsBnThread.stop) return; if (tsBnThread.stop) return;
tsBnThread.timer = NULL;
bnStartTimer(-1);
bnCheckStatus();
if (handle == NULL) { if (handle == NULL) {
tsBnThread.timer = NULL;
++tsAccessSquence; ++tsAccessSquence;
bnStartTimer(-1);
bnCheckStatus();
if (tsAccessSquence % tsBalanceInterval == 0) { if (tsAccessSquence % tsBalanceInterval == 0) {
mDebug("balance function is scheduled by timer"); mDebug("balance function is scheduled by timer");
bnPostSignal(); bnPostSignal();
...@@ -131,5 +131,5 @@ void bnStartTimer(int32_t mseconds) { ...@@ -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) { ...@@ -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();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册