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

Update namespace on acquiring locks for a collection using UUID during dropIndex

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2022-03-07
    • 149

      While running dropIndex command:
      1- We acquire the lock of the collection using namespace.
      2- We take a copy of the collectionUUID & the namespace.
      3- We release the lock of the collection because of (SERVER-46216).
      4- We reacquire the lock of the collection using db and collectionUUID.
      5- after that we hit some code paths that assert that the locks for the namespace should be acquired.

      The issue happens when there is a concurrent renaming happening, so the namespace of the collection can be changed between step 3 & 4, so any code path that checks for the locks for the old namespace will fail.

      Suggestions: 
      1- To update the local copy of the namespace of the collection each time we reacquire the lock on step 4.

      2- (Harder) to make sure that after we release the lock on step 3, we don't use the namespace and replace it with db & uuid.
       

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            m.maher@mongodb.com Moustafa Maher
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: