summaryrefslogtreecommitdiff
path: root/src/mongo/s/cluster_write.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/cluster_write.cpp')
-rw-r--r--src/mongo/s/cluster_write.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/s/cluster_write.cpp b/src/mongo/s/cluster_write.cpp
index 8fe610978a8..a2400d59250 100644
--- a/src/mongo/s/cluster_write.cpp
+++ b/src/mongo/s/cluster_write.cpp
@@ -37,6 +37,7 @@
#include "mongo/base/status.h"
#include "mongo/db/write_concern_options.h"
+#include "mongo/s/balancer/balancer_configuration.h"
#include "mongo/s/catalog/catalog_cache.h"
#include "mongo/s/catalog/catalog_manager.h"
#include "mongo/s/chunk_manager.h"
@@ -45,6 +46,7 @@
#include "mongo/s/config.h"
#include "mongo/s/dbclient_shard_resolver.h"
#include "mongo/s/grid.h"
+#include "mongo/s/mongos_options.h"
#include "mongo/s/write_ops/batch_write_exec.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
@@ -110,7 +112,7 @@ void toBatchError(const Status& status, BatchedCommandResponse* response) {
* Splits the chunks touched based from the targeter stats if needed.
*/
void splitIfNeeded(OperationContext* txn, const NamespaceString& nss, const TargeterStats& stats) {
- if (!Chunk::ShouldAutoSplit) {
+ if (!mongosGlobalParams.shouldAutoSplit) {
return;
}
@@ -123,7 +125,7 @@ void splitIfNeeded(OperationContext* txn, const NamespaceString& nss, const Targ
shared_ptr<DBConfig> config = status.getValue();
- ChunkManagerPtr chunkManager;
+ shared_ptr<ChunkManager> chunkManager;
shared_ptr<Shard> dummyShard;
config->getChunkManagerOrPrimary(txn, nss.ns(), chunkManager, dummyShard);
@@ -134,7 +136,7 @@ void splitIfNeeded(OperationContext* txn, const NamespaceString& nss, const Targ
for (map<BSONObj, int>::const_iterator it = stats.chunkSizeDelta.begin();
it != stats.chunkSizeDelta.end();
++it) {
- ChunkPtr chunk;
+ shared_ptr<Chunk> chunk;
try {
chunk = chunkManager->findIntersectingChunk(txn, it->first);
} catch (const AssertionException& ex) {