summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-10-07 19:32:36 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-10-07 19:32:47 -0400
commit9f496a34f46adec73ed6da49b869c169c2a70519 (patch)
tree92276b70e81c7e79cdddb4e3d3b9c8dfaea2e161
parent4d825b60b071dfc166ce6a92ee71519af586a81b (diff)
downloadmongo-9f496a34f46adec73ed6da49b869c169c2a70519.tar.gz
SERVER-26500 Increase the 'short' sleep between balancer rounds
-rw-r--r--src/mongo/db/s/balancer/balancer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp
index 9b7db2ef8b7..1cc7d850ada 100644
--- a/src/mongo/db/s/balancer/balancer.cpp
+++ b/src/mongo/db/s/balancer/balancer.cpp
@@ -67,10 +67,11 @@ namespace {
const Seconds kBalanceRoundDefaultInterval(10);
-// Delay between balancer rounds if the last round found some chunks which needs to be balanced.
-// This value is set to 0 so that imbalanced clusters or clusters with tag range violations can be
-// processes as quickly as possible.
-const Seconds kShortBalanceRoundInterval(0);
+// Sleep between balancer rounds in the case where the last round found some chunks which needed to
+// be balanced. This value should be set sufficiently low so that imbalanced clusters will quickly
+// reach balanced state, but setting it too low may cause CRUD operations to start failing due to
+// not being able to establish a stable shard version.
+const Seconds kShortBalanceRoundInterval(1);
const auto getBalancer = ServiceContext::declareDecoration<std::unique_ptr<Balancer>>();