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

Holders of a ForwardingCatalogManager::ScopedDistLock should not call other methods on ForwardingCatalogManager

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.8
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 9 (09/18/15)

    Description

      Rather than call methods on ForwardingCatalogManager, holders of ForwardingCatalogManager::ScopedDistributedLock that need access to a catalog manager should get a pointer to the correct actual catalog manager by calling a method on their instance of ScopedDistributedLock.

      Because the FCM::SCD suppresses switching of the actual catalog manager underneath the ForwardingCatalogManager, it is unnecessary to engage FCM's locking and replacement detection. Furthermore, because the FCM::SCD is in scope, another operation on the FCM by the thread holding the FCM::SCD might block indefinitely waiting for the catalog manager to be replaced.

      This approach will cause operations that hold a ScopedDistributedLock, such as chunk migrations, to fail if the catalog manager needs to be replaced due to upgrade mid migration.

      Attachments

        Activity

          People

            spencer@mongodb.com Spencer Brody (Inactive)
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: