diff options
Diffstat (limited to 'src/mongo/db/commands/getmore_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/getmore_cmd.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index 28a3d8fb43b..8f91862d002 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -797,9 +797,14 @@ public: void validateResult(rpc::ReplyBuilderInterface* reply, boost::optional<TenantId> tenantId) { auto ret = reply->getBodyBuilder().asTempObj(); - CursorGetMoreReply::parse( - IDLParserContext{"CursorGetMoreReply", false /* apiStrict */, tenantId}, - ret.removeField("ok")); + + // We need to copy the serialization context from the request to the reply object + CursorGetMoreReply::parse(IDLParserContext("CursorGetMoreReply", + false /* apiStrict */, + tenantId, + SerializationContext::stateCommandReply( + _cmd.getSerializationContext())), + ret.removeField("ok")); } const GetMoreCommandRequest _cmd; |