summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/update_driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/update_driver.cpp')
-rw-r--r--src/mongo/db/update/update_driver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/update/update_driver.cpp b/src/mongo/db/update/update_driver.cpp
index 5b4809342be..f2eded44c39 100644
--- a/src/mongo/db/update/update_driver.cpp
+++ b/src/mongo/db/update/update_driver.cpp
@@ -278,6 +278,11 @@ Status UpdateDriver::update(OperationContext* opCtx,
// The supplied 'modifiedPaths' must be an empty set.
invariant(!modifiedPaths || modifiedPaths->empty());
+ if (!opCtx->isEnforcingConstraints()) {
+ applyParams.skipDotsDollarsCheck = true;
+ applyParams.validateForStorage = false;
+ }
+
if (_logOp && logOpRec) {
applyParams.logMode = internalQueryEnableLoggingV2OplogEntries.load()
? ApplyParams::LogMode::kGenerateOplogEntry