Validate UUID mismatch in dropCollection via the Shard Role API

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.3.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2026-02-16, CAR Team 2026-03-02
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      This is the execution ticket for SERVER-117460.

      When dropping a collection it's possible to specify the UUID to drop like:

      db.runCommand({drop: "xyz", collectionUUID: UUID("1234-5678")})

       

      Since SERVER-116090, dropCollection uses acquireCollectionOrView from the Shard Role API so we can pass the expectedUUID in the collection acquisition and remove the current ad-hoc checks (see _checkUUIDAndReplState, checkCollectionUUIDMismatch in drop_collection.cpp).

      There is an issue with this: viewful timeseries collections have a special behavior where they throw InvalidOptions rather than CollectionUUIDMismatch. We can change the behavior, or wait for 9.0 where viewful timeseries is removed.

            Assignee:
            Aitor Esteve Alvarado
            Reporter:
            Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: