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.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.18, 5.0.14, 6.0.3, 6.1.0-rc4, 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.1, v6.0, v5.0, v4.4
    • Execution Team 2022-09-19
    • 11

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: