-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
ALL
-
HI all
we set the balancingWindow like below
db.settings.update({_id:"balancer"},{$set:{activeWindow:{start:"15:00",stop:"16:00"}}},{upsert:true})
But found out that the migrate and balancing is still working outside the activeWindow.
And then check the source code of balancing.
I found out the source code in "mongo/src/mongo/s/grid.cpp" is like below:
bool Grid::shouldBalance(const SettingsType& balancerSettings) const { if (balancerSettings.isBalancerStoppedSet() && balancerSettings.getBalancerStopped()) { return false; } if (balancerSettings.isBalancerActiveWindowSet()) { boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); return balancerSettings.inBalancingWindow(now); } return true; }
It looks like whether the time is outside the activeWindow or not ,the return is always "true"
- duplicates
-
SERVER-20557 Active window setting is not being processed correctly
- Closed