diff options
author | Randolph Tan <randolph@10gen.com> | 2016-09-30 10:58:05 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2016-10-04 17:00:57 -0400 |
commit | d8b4ac75423456efd6401264e6d9c6b95d9b21e6 (patch) | |
tree | cbaab8df53bda5d9a14a55bd16887978450c30ba /src/mongo/s/sharding_uptime_reporter.cpp | |
parent | 32e57b5547d8bb1ee9693f043130af62beac4a96 (diff) | |
download | mongo-d8b4ac75423456efd6401264e6d9c6b95d9b21e6.tar.gz |
SERVER-26285 Make sure that the balancer settings gets refreshed periodically
Diffstat (limited to 'src/mongo/s/sharding_uptime_reporter.cpp')
-rw-r--r-- | src/mongo/s/sharding_uptime_reporter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/s/sharding_uptime_reporter.cpp b/src/mongo/s/sharding_uptime_reporter.cpp index 8a4b8d756d1..bdd7f0c26d3 100644 --- a/src/mongo/s/sharding_uptime_reporter.cpp +++ b/src/mongo/s/sharding_uptime_reporter.cpp @@ -34,6 +34,7 @@ #include "mongo/db/client.h" #include "mongo/db/server_options.h" +#include "mongo/s/balancer/balancer_configuration.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_mongos.h" #include "mongo/s/grid.h" @@ -71,6 +72,12 @@ void ShardingUptimeReporter::startPeriodicThread() { { auto txn = cc().makeOperationContext(); reportStatus(txn.get(), false); + + auto status = + Grid::get(txn.get())->getBalancerConfiguration()->refreshAndCheck(txn.get()); + if (!status.isOK()) { + warning() << "failed to refresh mongos settings" << causedBy(status); + } } sleepFor(kUptimeReportInterval); |