[SERVER-76635] Override SerializationContext when parsing aggregation requests Created: 27/Apr/23  Updated: 29/Oct/23  Resolved: 18/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Hugh Tong (Inactive)
Resolution: Fixed Votes: 0
Labels: ntdi_must_have
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-76634 Add SerializationContext object to Ex... Closed
is depended on by SERVER-74284 Fix existing tests for command serial... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-05-15, Server Serverless 2023-05-29
Participants:
Story Points: 3

 Description   

aggregation_request_helper::parseFromBSON() is used in a few places to parse and construct an AggregateCommandRequest object, but because this function calls the `parse(IDLParserContext&, BSONObj&)` override rather than OpMsgRequest, we must manually set the SerializationContext source tenantId flag where we have access to the OpMsgRequest.  We can create this object first, and pass it into the IDLParserContext object to seed the SerializationContext on the resulting command object, making it available to access from the command downstream.

As the goal of these changes are in pursuit of fixing tests that will fail once serializeForCommands and deserializeForCommands are plumbed in, no new tests are planned for this ticket.



 Comments   
Comment by Githook User [ 17/May/23 ]

Author:

{'name': 'Hugh Tong', 'email': 'hugh.tong@mongodb.com', 'username': 'cortrain'}

Message: SERVER-76635 Override SerializationContext when parsing agg requests
Branch: master
https://github.com/mongodb/mongo/commit/d55cc0bf9134958ec5651daef9b04e9eee4c3dbb

Generated at Thu Feb 08 06:33:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.