diff options
Diffstat (limited to 'src/mongo/s/analyze_shard_key_util.cpp')
-rw-r--r-- | src/mongo/s/analyze_shard_key_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/s/analyze_shard_key_util.cpp b/src/mongo/s/analyze_shard_key_util.cpp index 8fc280b5752..ac4ce4ce0a3 100644 --- a/src/mongo/s/analyze_shard_key_util.cpp +++ b/src/mongo/s/analyze_shard_key_util.cpp @@ -203,7 +203,7 @@ bool canAcceptWrites(OperationContext* opCtx, const NamespaceString& nss) { * Returns the command response. */ BSONObj executeWriteCommandLocal(OperationContext* opCtx, - const std::string dbName, + const DatabaseName& dbName, const BSONObj& cmdObj, const std::function<void(const BSONObj&)>& uassertWriteStatusFn) { DBDirectClient client(opCtx); @@ -224,7 +224,7 @@ BSONObj executeWriteCommandLocal(OperationContext* opCtx, * Returns the command response. */ BSONObj executeWriteCommandRemote(OperationContext* opCtx, - const std::string dbName, + const DatabaseName& dbName, const BSONObj& cmdObj, const std::function<void(const BSONObj&)>& uassertWriteStatusFn) { auto hostAndPort = repl::ReplicationCoordinator::get(opCtx)->getCurrentPrimaryHostAndPort(); @@ -269,7 +269,7 @@ BSONObj executeWriteCommand(OperationContext* opCtx, const NamespaceString& nss, const BSONObj& cmdObj, const std::function<void(const BSONObj&)>& uassertWriteStatusFn) { - const auto dbName = nss.db().toString(); + const auto dbName = nss.dbName(); auto numRetries = 0; while (true) { |