summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-12-09 15:58:25 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-12-16 21:24:49 -0500
commitc7bf862d8d75fa14801cfe8997a693e05a88594a (patch)
treeec44e2e9e06e0e7c46a683d98e09806c22fff2ee /src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
parent834fe4857af1cd75f2cd70f7682540dbe3a2ced6 (diff)
downloadmongo-c7bf862d8d75fa14801cfe8997a693e05a88594a.tar.gz
SERVER-27366 Remove DBConfig::enableSharding
Diffstat (limited to 'src/mongo/s/commands/cluster_enable_sharding_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_enable_sharding_cmd.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
index 1254fca23b5..bd7adb2fbb6 100644
--- a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
+++ b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp
@@ -105,15 +105,13 @@ public:
return false;
}
- Status status = grid.catalogClient(txn)->enableSharding(txn, dbname);
- if (status.isOK()) {
- audit::logEnableSharding(Client::getCurrent(), dbname);
- }
+ uassertStatusOK(Grid::get(txn)->catalogClient(txn)->enableSharding(txn, dbname));
+ audit::logEnableSharding(Client::getCurrent(), dbname);
// Make sure to force update of any stale metadata
- grid.catalogCache()->invalidate(dbname);
+ Grid::get(txn)->catalogCache()->invalidate(dbname);
- return appendCommandStatus(result, status);
+ return true;
}
} enableShardingCmd;