Fix removeShard to include non-system collections containing '.system.'

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • 1
    • 🟩 Routing and Topology
    • None
    • None
    • None
    • None
    • None
    • None

      The removeShard command outputs a list of unsharded collections that must be moved before the shard can be removed.
      This list is generated through an aggregation pipeline that calls $listClusterCatalog and then filters out collections that are either sharded or do not require relocation.

      Currently, the aggregation excludes all namespaces containing .system. in their name. However, only collections whose names begin with system are true system collections. For example, a user-defined collection such as 'my.system.coll' would be excluded from the removeShard response even though it is not a system collection.

      This behavior is not considered a bug, since creating collections with '.system.' in their names is not permitted. Still, to be cautious, we prefer to adjust the aggregation so that it explicitly checks only for valid system collections. This ensures correctness if the restriction is ever relaxed or bypassed in the future.

            Assignee:
            Unassigned
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: