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

ExpressionContext::inMongos does not reliably reflect the execution context

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

      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:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: