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

Incorrect check for whether a collection is sharded in cluster_aggregate.cpp

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution
    • QE 2021-12-27, QE 2022-01-10, QE 2022-04-04, QE 2022-02-07, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21, QE 2022-01-24, QE 2022-04-18, QE 2022-05-02

      Currently cluster_aggregate.cpp asserts that for each involved namesapce, either all of the pipeline stages work with sharded collections or the namespace is not sharded (via this function that is passed in).

      However, it is not correct for a router to use its routing table cache to check if a collection is sharded, because the cache can be stale: the collection could have been dropped and recreated as unsharded.

      Instead, the router could assume the collection is unsharded and the data node could error if the collection is actually sharded.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: