diff options
Diffstat (limited to 'src/mongo/db/pipeline/process_interface_standalone.cpp')
| -rw-r--r-- | src/mongo/db/pipeline/process_interface_standalone.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/process_interface_standalone.cpp b/src/mongo/db/pipeline/process_interface_standalone.cpp index fed8b7076e8..7f2cf3e96f7 100644 --- a/src/mongo/db/pipeline/process_interface_standalone.cpp +++ b/src/mongo/db/pipeline/process_interface_standalone.cpp @@ -181,7 +181,7 @@ Update MongoInterfaceStandalone::buildUpdateOp( const boost::intrusive_ptr<ExpressionContext>& expCtx, const NamespaceString& nss, BatchedObjects&& batch, - bool upsert, + UpsertType upsert, bool multi) { Update updateOp(nss); updateOp.setUpdates([&] { @@ -193,7 +193,9 @@ Update MongoInterfaceStandalone::buildUpdateOp( entry.setQ(std::move(q)); entry.setU(std::move(u)); entry.setC(std::move(c)); - entry.setUpsert(upsert); + entry.setUpsert(upsert != UpsertType::kNone); + entry.setUpsertSupplied({{entry.getUpsert() && expCtx->useNewUpsert, + upsert == UpsertType::kInsertSuppliedDoc}}); entry.setMulti(multi); return entry; }()); @@ -232,7 +234,7 @@ StatusWith<MongoProcessInterface::UpdateResult> MongoInterfaceStandalone::update const NamespaceString& ns, BatchedObjects&& batch, const WriteConcernOptions& wc, - bool upsert, + UpsertType upsert, bool multi, boost::optional<OID> targetEpoch) { auto writeResults = |
