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

Remove use of ShardingState in sharded_agg_helpers

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com George Wangensteen
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: