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

avoid taking the PBWM lock in ReplicationCoordinatorExternalStateImpl::oplogExists()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.3
    • Storage
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2019-12-16
    • 21

    Description

      This function is used by the read concern code to check if the oplog collection is initialized and can be called on both primaries and secondaries. On secondary nodes, the current implementation, introduced in SERVER-35870, uses the collection lock RAII type, which implicitly acquires the PBWM lock.

      The oplog collection check is currently done using the AutoGetCollection RAII type, which requires the PBWM lock. It should be possible to avoid taking any locks by querying the CollectionCatalog directly. An alternative to the CollectionCatalog might be to use LocalOplogInfo::getCollection().

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: