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

Assert the validity of the SerializationContext object on the expression context for DocumentSourceCollStats::createFromBson

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • Service Arch Prioritized List, Server Serverless 2023-08-21
    • 2

      `DocumentSourceCollStats::createFromBson()` passes a `SerializationContext` object pulled from the expression context into the `IDLParserContext` object used by `DocumentSourceCollStatsSpec::parse()`, but the expression context may or may not contain a valid `SerializationContext` object.  An invalid `SerializationContext` object can be default constructed on construction of an `ExpressionContext` object as `ExpressionContext` objects are used in several different ways.  When an `ExpressionContext` object is constructed via an `AggregateCommandRequest`, it should always contain a valid `SerializationContext` object, so we should assert this when `DocumentSourceCollStatsSpec::parse()` is called in order to avoid serializing a collStats reply incorrectly yet failing silently.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: