Clear stale collection CSS when recreating a database on the primary shard

XMLWordPrintableJSON

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2026-06-22
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A shard can keep stale collection filtering metadata (CSS/CSR) from a previous database incarnation after dropDatabase, and that stale state can conflict with the recreated database.

       

      Proposed fix:

      In the local createDatabase metadata commit path, after setting DSS for the database, iterate the known collection CSS namespaces for that DB and clear their collection metadata on the DB primary shard.

      This should only be done on the new DB primary shard. Other shards can keep kUnowned for that DB until a future operation, such as chunk arrival or collection metadata commit, gives them ownership.

            Assignee:
            Pol Pinol
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: