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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Storage
    • Labels:
      None

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: