Investigate changes in SERVER-108882: Explain operations should not implicitly create a database on a sharded cluster

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator
    • 5

      Original Downstream Change Summary

      This changes the explain output for aggregation pipelines running against non-existing databases on sharded clusters. Mongos used to implicitly create the targeted database on one of the shards and redirect the explain command there. Now it internally constructs an EOF explain instead, without implicitly creating the database.

      Description of Linked Ticket

      In the past, the explain commands have been implicitly creating a database when the database didn't exist because they were instantiating the CollectionRoutingInfoTargeter on the mongos (which implicitly creates the db if it doesn't exist).

      This made the explain operations run always against an existing database.

      When we started using the CollectionRouter to coordinate the collection routing under SERVER-103705 and SERVER-103706, it was necessary to explicitly create the database as one of the first steps of the explain operation on the mongos.

      The goal of this task is to be able to respond an explain command without creating the database if it doesn't exist.

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: