summaryrefslogtreecommitdiff
path: root/src/mongo/db/views
diff options
context:
space:
mode:
authorJustin Seyster <justin.seyster@mongodb.com>2018-08-26 22:08:27 -0400
committerJustin Seyster <justin.seyster@mongodb.com>2018-08-26 22:08:27 -0400
commitb93c2dcc30de6f33f871ff2b8df88ac5afafbbc1 (patch)
tree28ef7d5e310dc8453a2129df04a2959878e087fe /src/mongo/db/views
parentf66a67ac3e80f4968506cab34ac35668d65a13e6 (diff)
downloadmongo-b93c2dcc30de6f33f871ff2b8df88ac5afafbbc1.tar.gz
SERVER-36224 Refactor Collection::updateDocument args
Previously, Collection::updateDocument expected to get a namespace and UUID from its OplogEntryUpdateArgs, but that is not necessary, because the collection already knows its own namespace and UUID. This caused a problem in DurableViewCatalogImpl::upsert(), which did not set the UUID value in the args, leading to oplog entries without their UUID value.
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r--src/mongo/db/views/durable_view_catalog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp
index c02b091e88c..3284b303d40 100644
--- a/src/mongo/db/views/durable_view_catalog.cpp
+++ b/src/mongo/db/views/durable_view_catalog.cpp
@@ -149,8 +149,7 @@ void DurableViewCatalogImpl::upsert(OperationContext* opCtx,
uassertStatusOK(
systemViews->insertDocument(opCtx, InsertStatement(view), &CurOp::get(opCtx)->debug()));
} else {
- OplogUpdateEntryArgs args;
- args.nss = systemViewsNs;
+ CollectionUpdateArgs args;
args.update = view;
args.criteria = BSON("_id" << name.ns());
args.fromMigrate = false;