Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-66355

Pass dbName to validateViewDefinitionBSON in DurableViewCatalog::onExternalInsert

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0, 6.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-06-13
    • 10

      validateViewDefinitionBSON is meant to take in the db name, however in DurableViewCatalog::onExternalInsert we pass the full namespace. This causes this uassert to fail because database names are not allowed to contain a ".", and since we pass the full namespace for dbName, it will contain a ".". The exception is currently swallowed because we catch exceptions thrown by onExternalInsert.

      However, if we change DurableViewCatalog::onExternalInsert to correctly pass the dbName, we'll eventually hit this invariant in CollectionCatalog::createView because we don't actually ever take a collection lock on the view name currently - we have a lock on the database and the collection name itself, but not the view.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            janna.golden@mongodb.com Janna Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: