summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_move_primary_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/commands/cluster_move_primary_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_move_primary_cmd.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mongo/s/commands/cluster_move_primary_cmd.cpp b/src/mongo/s/commands/cluster_move_primary_cmd.cpp
index 5be8441a951..f5ba8b9fb93 100644
--- a/src/mongo/s/commands/cluster_move_primary_cmd.cpp
+++ b/src/mongo/s/commands/cluster_move_primary_cmd.cpp
@@ -133,7 +133,8 @@ public:
shared_ptr<Shard> toShard = grid.shardRegistry()->getShard(txn, to);
if (!toShard) {
string msg(str::stream() << "Could not move database '" << dbname << "' to shard '"
- << to << "' because the shard does not exist");
+ << to
+ << "' because the shard does not exist");
log() << msg;
return appendCommandStatus(result, Status(ErrorCodes::ShardNotFound, msg));
}
@@ -192,8 +193,11 @@ public:
bool worked = toconn->runCommand(
dbname.c_str(),
BSON("clone" << fromShard->getConnString().toString() << "collsToIgnore" << barr.arr()
- << bypassDocumentValidationCommandOption() << true
- << "_checkForCatalogChange" << true << "writeConcern"
+ << bypassDocumentValidationCommandOption()
+ << true
+ << "_checkForCatalogChange"
+ << true
+ << "writeConcern"
<< txn->getWriteConcern().toBSON()),
cloneRes);
toconn.done();
@@ -233,7 +237,8 @@ public:
}
} catch (DBException& e) {
e.addContext(str::stream() << "movePrimary could not drop the database " << dbname
- << " on " << oldPrimary);
+ << " on "
+ << oldPrimary);
throw;
}
@@ -268,7 +273,9 @@ public:
} catch (DBException& e) {
e.addContext(str::stream()
<< "movePrimary could not drop the cloned collection "
- << el.String() << " on " << oldPrimary);
+ << el.String()
+ << " on "
+ << oldPrimary);
throw;
}
}