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

Pass serialization context into agg parseFromBSON from error_labels

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Serverless
    • Fully Compatible
    • Server Serverless 2023-09-18

      isResumableChangeStreamError is not currently passing in a serialization context when calling aggregation_request_helper::parseFromBSON which can cause us to deserialize agg fields incorrectly.  In order to reach a valid request, we will need to go back up the call stack several layers and pass it down.

      AggregateCommandRequest::parse()    <-- consumes sc here
          aggregation_request_helper::parseFromBSON() <-- no sc here
              ErrorLabelBuilder::isResumableChangeStreamError()
                  ErrorLabelBuilder::build
                      getErrorLabels
                          ParseAndRunCommand::_updateStatsAndApplyErrorLabels <-- request can be pulled from _rec
                          appendErrorLabelsAndTopologyVersion
                              ExecCommandDatabase::_handleFailure     <-- OpMsgRequest is available here
                              RunCommandImpl::_epilogue()             <-- OpMsgRequest is available here
       

      We may consider pulling the VTS off the opCtx for this fix as a stopgap, but we likely want to pull it from the request where possible.  This change is in support of SERVER-73113, and can be tested by enabling the dbName assertions in that ticket.

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

              Created:
              Updated:
              Resolved: