diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2018-01-10 17:09:22 -0500 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2018-01-16 13:52:44 -0500 |
commit | a6e45f0e35724ae7958e31fc141c89afcefe4d33 (patch) | |
tree | 5ac0bf28fc1b977078845cbff966ff3427cfaa92 /src/mongo/db/commands/collection_to_capped.cpp | |
parent | 1378f8ec42068913c5bdc5927bbe86d5aed08814 (diff) | |
download | mongo-a6e45f0e35724ae7958e31fc141c89afcefe4d33.tar.gz |
SERVER-32646 CommandHelpers
Diffstat (limited to 'src/mongo/db/commands/collection_to_capped.cpp')
-rw-r--r-- | src/mongo/db/commands/collection_to_capped.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/collection_to_capped.cpp b/src/mongo/db/commands/collection_to_capped.cpp index 55272f941a0..5f283fa2195 100644 --- a/src/mongo/db/commands/collection_to_capped.cpp +++ b/src/mongo/db/commands/collection_to_capped.cpp @@ -121,7 +121,7 @@ public: NamespaceString nss(dbname, to); if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(opCtx, nss)) { - return appendCommandStatus( + return CommandHelpers::appendCommandStatus( result, Status(ErrorCodes::NotMaster, str::stream() << "Not primary while cloning collection " << from << " to " @@ -131,7 +131,7 @@ public: Database* const db = autoDb.getDb(); if (!db) { - return appendCommandStatus( + return CommandHelpers::appendCommandStatus( result, Status(ErrorCodes::NamespaceNotFound, str::stream() << "database " << dbname << " not found")); @@ -139,7 +139,7 @@ public: Status status = cloneCollectionAsCapped(opCtx, db, from.toString(), to.toString(), size, temp); - return appendCommandStatus(result, status); + return CommandHelpers::appendCommandStatus(result, status); } } cmdCloneCollectionAsCapped; @@ -173,7 +173,7 @@ public: const BSONObj& jsobj, string& errmsg, BSONObjBuilder& result) { - const NamespaceString nss(parseNsCollectionRequired(dbname, jsobj)); + const NamespaceString nss(CommandHelpers::parseNsCollectionRequired(dbname, jsobj)); double size = jsobj.getField("size").number(); if (size == 0) { @@ -181,7 +181,7 @@ public: return false; } - return appendCommandStatus(result, convertToCapped(opCtx, nss, size)); + return CommandHelpers::appendCommandStatus(result, convertToCapped(opCtx, nss, size)); } } cmdConvertToCapped; |