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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2019-12-16
    • 21

      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().

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

              Created:
              Updated:
              Resolved: