summaryrefslogtreecommitdiff
path: root/src/mongo/s/balancer_configuration.h
diff options
context:
space:
mode:
authorJanna Golden <janna.golden@mongodb.com>2019-11-05 15:52:39 +0000
committerevergreen <evergreen@mongodb.com>2019-11-05 15:52:39 +0000
commitc150b588cb4400e0324becd916de2a699988af99 (patch)
treeb007619ce25c62cad0e275d01a8f57be0fa36d57 /src/mongo/s/balancer_configuration.h
parentda5b6eff05c710029994ae1e06b47d1974974f6c (diff)
downloadmongo-c150b588cb4400e0324becd916de2a699988af99.tar.gz
SERVER-42273 Introduce 'force' option to 'moveChunk' to allow migrating jumbo chunks
Diffstat (limited to 'src/mongo/s/balancer_configuration.h')
-rw-r--r--src/mongo/s/balancer_configuration.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mongo/s/balancer_configuration.h b/src/mongo/s/balancer_configuration.h
index 10b174e43e0..630a60e5248 100644
--- a/src/mongo/s/balancer_configuration.h
+++ b/src/mongo/s/balancer_configuration.h
@@ -107,6 +107,15 @@ public:
return _waitForDelete;
}
+ /**
+ * Returns whether the balancer should schedule migrations of chunks that are 'large' rather
+ * than marking these chunks as 'jumbo' (meaning they will not be scheduled for split or
+ * migration).
+ */
+ bool attemptToBalanceJumboChunks() const {
+ return _attemptToBalanceJumboChunks;
+ }
+
private:
BalancerSettingsType();
@@ -118,6 +127,8 @@ private:
MigrationSecondaryThrottleOptions _secondaryThrottle;
bool _waitForDelete{false};
+
+ bool _attemptToBalanceJumboChunks{false};
};
/**
@@ -236,6 +247,13 @@ public:
bool waitForDelete() const;
/**
+ * Returns whether the balancer should attempt to schedule migrations of 'large' chunks. If
+ * false, the balancer will instead mark these chunks as 'jumbo', meaning they will not be
+ * scheduled for any split or move in the future.
+ */
+ bool attemptToBalanceJumboChunks() const;
+
+ /**
* Returns the max chunk size after which a chunk would be considered jumbo.
*/
uint64_t getMaxChunkSizeBytes() const {