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

Consider changing MigrationDestinationManager::cloneCollectionIndexesAndOptions to not take DB MODE_X lock

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 7.3.0, 8.1.0-rc0, 8.0.0-rc1
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • v8.0, v7.3, v7.0, v6.0, v5.0
    • CAR Team 2024-04-15, CAR Team 2024-04-29, CAR Team 2024-05-13, CAR Team 2024-05-27, CAR Team 2024-06-10, CAR Team 2024-06-24, CAR Team 2024-07-08, CAR Team 2024-07-22, CAR Team 2024-08-05
    • 0
    • 1

      MigrationDestinationManager::cloneCollectionIndexesAndOptions takes a database MODE_X lock if the collection does not exist or is missing required indexes. This can cause stalls on transactions that involve other collections from the same database. This DB-level MODE_X lock seems excessive: Collection creation only needs collection/db in MODE_IX; and createIndexesOnEmptyCollection needs collection in MODE_X (so DB in MODE_IX).
      This ticket is to consider relaxing at least the db-level exclusive lock to IX.

            Assignee:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: