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

Command checkAuthorization may throw ErrorCodes::NamespaceNotFound for existing collection while trying to resolve UUID to namespace when the node is shutting down.

    • Fully Compatible
    • ALL
    • v6.1, v6.0, v5.0, v4.4
    • Execution Team 2022-09-19
    • 11

      Nodes can throw ErrorCodes::NamespaceNotFound for existing collections while trying to resolve UUID to namespace when the node is shutting down and has finished deregistering all the collections and clearing the CollectionCatalog::_catlog map from the in-memory collection catalog. There are few commands, like, count, tries to resolve UUID to namespace as part of the authorization check without holding any locks. ErrorCodes::NamespaceNotFound makes the multi-tenant migration protocol to skip cloning the collection from donor to recipient as the recipient assumes that the collection was dropped on the donor. And, the tenant migration may still go ahead and commit without copying all collections of the tenant from donor to recipient and leading to data corruption.

      Note: This a problem with logical initial sync as well.

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: