summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2023-02-28 16:10:37 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-28 18:30:41 +0000
commit951a2ddf46b4835dff8f407b12f8011a4071c62c (patch)
tree9a22f6f6008e2248c88e345dcb6320e4487873f0 /src/mongo/db/commands
parent532c0679ef4fc8313a9e00a1334ca18e04ff6914 (diff)
downloadmongo-951a2ddf46b4835dff8f407b12f8011a4071c62c.tar.gz
SERVER-73689 Fix shard key update check in update_stage.cpp to exclude _id queries
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/find_and_modify.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp
index d7dbad7dade..cdc7965ddfa 100644
--- a/src/mongo/db/commands/find_and_modify.cpp
+++ b/src/mongo/db/commands/find_and_modify.cpp
@@ -703,6 +703,9 @@ write_ops::FindAndModifyCommandReply CmdFindAndModify::Invocation::typedRun(
}
updateRequest.setSampleId(req.getSampleId());
+ updateRequest.setAllowShardKeyUpdatesWithoutFullShardKeyInQuery(
+ req.getAllowShardKeyUpdatesWithoutFullShardKeyInQuery());
+
const ExtensionsCallbackReal extensionsCallback(
opCtx, &updateRequest.getNamespaceString());
ParsedUpdate parsedUpdate(opCtx, &updateRequest, extensionsCallback);