diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-07-10 15:48:30 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2018-08-09 23:02:51 +0100 |
commit | fa8f737443dbcd604071baee6e7daa148d92ce68 (patch) | |
tree | 364914a4fac03b464bc3cca272c7b6914553892e /src/mongo/db/repl/storage_interface_impl.cpp | |
parent | 55ff5175dfde9be093f69e792bac8408639c4653 (diff) | |
download | mongo-fa8f737443dbcd604071baee6e7daa148d92ce68.tar.gz |
SERVER-35860 Maintain multikey metadata keys for allPaths indexes
Diffstat (limited to 'src/mongo/db/repl/storage_interface_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/storage_interface_impl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp index 15598202a70..e0775d5c0aa 100644 --- a/src/mongo/db/repl/storage_interface_impl.cpp +++ b/src/mongo/db/repl/storage_interface_impl.cpp @@ -66,6 +66,7 @@ #include "mongo/db/operation_context.h" #include "mongo/db/ops/delete_request.h" #include "mongo/db/ops/parsed_update.h" +#include "mongo/db/ops/update_lifecycle_impl.h" #include "mongo/db/ops/update_request.h" #include "mongo/db/query/get_executor.h" #include "mongo/db/query/internal_plans.h" @@ -879,8 +880,10 @@ Status StorageInterfaceImpl::upsertById(OperationContext* opCtx, // We can create an UpdateRequest now that the collection's namespace has been resolved, in // the event it was specified as a UUID. UpdateRequest request(collection->ns()); + UpdateLifecycleImpl lifeCycle(collection->ns()); request.setQuery(query); request.setUpdates(update); + request.setLifecycle(&lifeCycle); request.setUpsert(true); invariant(!request.isMulti()); // This follows from using an exact _id query. invariant(!request.shouldReturnAnyDocs()); @@ -919,8 +922,10 @@ Status StorageInterfaceImpl::putSingleton(OperationContext* opCtx, const NamespaceString& nss, const TimestampedBSONObj& update) { UpdateRequest request(nss); + UpdateLifecycleImpl lifeCycle(nss); request.setQuery({}); request.setUpdates(update.obj); + request.setLifecycle(&lifeCycle); request.setUpsert(true); return _updateWithQuery(opCtx, request, update.timestamp); } @@ -930,8 +935,10 @@ Status StorageInterfaceImpl::updateSingleton(OperationContext* opCtx, const BSONObj& query, const TimestampedBSONObj& update) { UpdateRequest request(nss); + UpdateLifecycleImpl lifeCycle(nss); request.setQuery(query); request.setUpdates(update.obj); + request.setLifecycle(&lifeCycle); invariant(!request.isUpsert()); return _updateWithQuery(opCtx, request, update.timestamp); } |