ExpressionContext::inMongos does not reliably reflect the execution context

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • v6.1, v6.0
    • 173
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When creating an ExpressionContext within ClusterAggregate::runAggregate, we unconditionally set the inMongos field to true. We do this because, at the time this code was written, ClusterAggregate was only linked into and available on mongoS.

      However, this appears to have changed as a result of SERVER-45389. After this point, ClusterAggregate is linked into mongod and is used by the PeriodicShardedIndexConsistencyChecker, which runs on the config server primary.

      Since ClusterAggregate no longer exclusively runs on mongoS, we need a more robust means of setting inMongos.

      We should also investigate whether ExpressionContext::fromMongos reliably reflects the execution context.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: