summaryrefslogtreecommitdiff
path: root/src/mongo/s/chunk.h
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2016-04-06 11:36:13 -0400
committerEsha Maharishi <esha.maharishi@mongodb.com>2016-04-06 11:42:02 -0400
commitb9bd0eb46147a7a965f50f076dea57f85fe321e8 (patch)
tree3e5da0d44a5befe3823528476f6f0bcebdff1aa2 /src/mongo/s/chunk.h
parent202fd419457c47650be27accb038a700134797ed (diff)
downloadmongo-b9bd0eb46147a7a965f50f076dea57f85fe321e8.tar.gz
SERVER-23534 move miscellaneous methods off Grid
Diffstat (limited to 'src/mongo/s/chunk.h')
-rw-r--r--src/mongo/s/chunk.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/s/chunk.h b/src/mongo/s/chunk.h
index 39294692c7f..0adb301bf23 100644
--- a/src/mongo/s/chunk.h
+++ b/src/mongo/s/chunk.h
@@ -29,6 +29,7 @@
#pragma once
#include "mongo/s/catalog/type_chunk.h"
+#include "mongo/s/catalog/type_settings.h"
#include "mongo/s/chunk_version.h"
#include "mongo/s/client/shard.h"
@@ -81,6 +82,17 @@ public:
return _max;
}
+ /**
+ * Returns true if the balancer should be running. Caller is responsible for making sure
+ * settings has the balancer key.
+ */
+ static bool shouldBalance(const SettingsType& balancerSettings);
+
+ /**
+ * Returns true if the config server settings indicate that the balancer should be active.
+ */
+ bool getConfigShouldBalance(OperationContext* txn) const;
+
// Returns true if this chunk contains the given shard key, and false otherwise
//
// Note: this function takes an extracted *key*, not an original document