summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}