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

Use originating command for some expression context flags instead.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • QE 2022-05-30, QE 2022-06-13, QE 2022-06-27, QE 2022-07-11, QE 2022-09-19

      There are some expression context flags like allowDiskUse, fromMongos, needsMerge, bypassDocumentValidation, and hasWhere flags that are set based on things that are in the original command. Instead of storing these extra flags we could just have a reference to the original command and code could check that, or we could turn the flags into getters like fromMongos(). We already store the original command in cursors to begin with and even have an originalCommand field on the expression context. it's just not set a lot of the time. A downside to this approach is during testing the originalCommand would have to be updated instead of just setting a bool to true.

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            mickey.winters@mongodb.com Mickey Winters
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: