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
    • Catalog and Routing
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      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 are two issues with this:

      1. If dropping a non-existing view and there are invalid views in the view catalog, drop should validate no UUID was specified, then return OK. However, the Shard Role API throws an InvalidViewDefinition exception before validating the UUID. This is the same root problem as SERVER-74313.
      2. Viewful timeseries collections have a special behavior where they throw InvalidOptions rather than CollectionUUIDMismatch.

       

      For (1) we may choose to fix SERVER-74313 or implement a workaround.

      For (2) we can change the behavior, or wait for 9.0 where viewful timeseries is removed.

            Assignee:
            Unassigned
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: