distinct IDL always parses command with hardcoded apiStrict == false. It should probably be looked up from opCtx instead

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      https://github.com/10gen/mongo/blob/2911056b7f0e849fc1f5ba7e816744bb54654398/src/mongo/db/query/parsed_distinct.cpp#L275C3-L275C3 

       

      Replace

      IDLParserContext ctx("distinct", false /* apiStrict */, nss.tenantId(), sc); 

      with

      const bool apiStrict = APIParameters::get(opCtx).getAPIStrict().value_or(false);
      IDLParserContext ctx("distinct", apiStrict, nss.tenantId(), sc); 

       

       

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Serhii Lysenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: