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

ExpressionContext::inMongos does not reliably reflect the execution context

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Query Execution
    • ALL
    • v6.1, v6.0
    • 173

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: