Prevent kickback to router when reading from views on unsplittable collections located on the db-primary

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27
    • 20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When reading from a view, mongos will first target the db-primary shard (where view definitions live). The shard will then resolve the view and either:
      a) Execute the read on the underlying collection locally, if the underlying collection is UNSHARDED (i.e. untracked).
      b) "kick back" to mongos, so that mongos retargets the read as an aggregation directly on the underlying collection.

      We must preserve the optimized path (a) for unsplittable collections that live on the db-primary shard. Currently the optimization is not kept because we only attempt local read when the collection in untracked.

            Assignee:
            Jordi Serra Torrens
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: