diff options
Diffstat (limited to 'src/mongo/db/catalog/capped_utils.cpp')
| -rw-r--r-- | src/mongo/db/catalog/capped_utils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/catalog/capped_utils.cpp b/src/mongo/db/catalog/capped_utils.cpp index 71f74628f01..63b46d3c3a8 100644 --- a/src/mongo/db/catalog/capped_utils.cpp +++ b/src/mongo/db/catalog/capped_utils.cpp @@ -66,13 +66,13 @@ Status emptyCapped(OperationContext* txn, const NamespaceString& collectionName) } Database* db = autoDb.getDb(); - massert(13429, "no such database", db); + uassert(ErrorCodes::NamespaceNotFound, "no such database", db); Collection* collection = db->getCollection(collectionName); uassert(ErrorCodes::CommandNotSupportedOnView, str::stream() << "emptycapped not supported on view: " << collectionName.ns(), collection || !db->getViewCatalog()->lookup(txn, collectionName.ns())); - massert(28584, "no such collection", collection); + uassert(ErrorCodes::NamespaceNotFound, "no such collection", collection); if (collectionName.isSystem() && !collectionName.isSystemDotProfile()) { return Status(ErrorCodes::IllegalOperation, @@ -268,6 +268,7 @@ Status convertToCapped(OperationContext* txn, const NamespaceString& collectionN Status status = db->dropCollection(txn, longTmpName); if (!status.isOK()) return status; + wunit.commit(); } |
