diff options
author | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-06-12 11:29:41 -0400 |
---|---|---|
committer | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-06-12 13:58:14 -0400 |
commit | a6cc895fa631e29e8c7ee6ec61a6b7a21a370bf3 (patch) | |
tree | 25a6d1506c113ad3e13bb36f4f60ae7e2f465afc /src/mongo/db/commands/find_and_modify.cpp | |
parent | 85d4c70b894b3f2ebc19115a573bf01b27ac89e1 (diff) | |
download | mongo-a6cc895fa631e29e8c7ee6ec61a6b7a21a370bf3.tar.gz |
SERVER-35351: Have implicit creation of `system.views` in a separate WUOW.
Diffstat (limited to 'src/mongo/db/commands/find_and_modify.cpp')
-rw-r--r-- | src/mongo/db/commands/find_and_modify.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp index 41c3e01c696..194691412f3 100644 --- a/src/mongo/db/commands/find_and_modify.cpp +++ b/src/mongo/db/commands/find_and_modify.cpp @@ -481,8 +481,11 @@ public: if (!collection) { uassertStatusOK(userAllowedCreateNS(nsString.db(), nsString.coll())); WriteUnitOfWork wuow(opCtx); + CollectionOptions collectionOptions; + uassertStatusOK(collectionOptions.parse( + BSONObj(), CollectionOptions::ParseKind::parseForCommand)); uassertStatusOK(Database::userCreateNS( - opCtx, autoDb->getDb(), nsString.ns(), BSONObj())); + opCtx, autoDb->getDb(), nsString.ns(), collectionOptions)); wuow.commit(); collection = autoDb->getDb()->getCollection(opCtx, nsString); |