summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Saltz <matthew.saltz@mongodb.com>2019-07-11 13:33:19 -0400
committerMatthew Saltz <matthew.saltz@mongodb.com>2019-07-31 13:46:44 -0400
commit0b8eaf330fafce91a5f31f97f63703e42ba10b68 (patch)
tree33b82410062fe41199bd2147eb842abd557b3071
parent0f41fa2d430cca4912820ed0fe929e193b005e94 (diff)
downloadmongo-0b8eaf330fafce91a5f31f97f63703e42ba10b68.tar.gz
SERVER-36394 Don't refresh balancer configuration for autosplit if autosplit is currently disabled
(cherry picked from commit 4a0def0129ae5aa6c8ea951b5c452c8938cf4d83)
-rw-r--r--src/mongo/s/commands/cluster_write.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_write.cpp b/src/mongo/s/commands/cluster_write.cpp
index 441dc81032f..9e92f2053d2 100644
--- a/src/mongo/s/commands/cluster_write.cpp
+++ b/src/mongo/s/commands/cluster_write.cpp
@@ -260,7 +260,8 @@ void updateChunkWriteStatsAndSplitIfNeeded(OperationContext* opCtx,
const uint64_t desiredChunkSize = balancerConfig->getMaxChunkSizeBytes();
- if (!chunk->shouldSplit(desiredChunkSize, minIsInf, maxIsInf)) {
+ if (!chunk->shouldSplit(desiredChunkSize, minIsInf, maxIsInf) ||
+ !balancerConfig->getShouldAutoSplit()) {
return;
}