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

XMLWordPrintableJSON

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

      `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:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: