Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76635

Override SerializationContext when parsing aggregation requests

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Server Serverless 2023-05-15, Server Serverless 2023-05-29
    • 3

      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.

            Assignee:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: