Remove use of ShardingState in sharded_agg_helpers

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2023-12-11, Service Arch 2023-12-25
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      sharded_agg_helpers::attachCursorToPipeline can be run from both the router and shard (mongos and mongod). However, thus function uses the ShardingState service-context decoration, which should only be present on mongod, to get the 'local' shardID for use in an optimization.
      This is innocuous for now because the ShardingState is never initialized on mongos and the 'default' shardId isn't targeted. But we should remove the use of this shard-role code from code that can run under the router role. Removing ShardingSTate from mongos is tracked via SERVER-81023

            Assignee:
            George Wangensteen (Inactive)
            Reporter:
            George Wangensteen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: