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

Do not acquire storage tickets just to set/wait on oplog visibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.2.16, 4.0.27, 4.4.10, 5.0.4, 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4, v4.2, v4.0
    • Execution Team 2021-08-09, Execution Team 2021-08-23

    Description

      When we wait on oplog visibility with waitForAllEarlierOplogWritesToBeVisible, and when we set oplog visibility with oplogDiskLocRegister, we acquire a global lock, which automatically takes a storage read ticket. Together, doing both can result in a deadlock. Just having waitForAllEarlierOplogWritesToBeVisible take a ticket can result on local reads blocking behind reads with a read concern that's waiting for oplog writes. Since neither operation affects the resources protected by read tickets, we should use skipAcquireTicket() when acquiring these locks.

      (We may need an RAII type to set/restore that flag)

      Attachments

        Issue Links

          Activity

            People

              gregory.wlodarek@mongodb.com Gregory Wlodarek
              matthew.russotto@mongodb.com Matthew Russotto
              Votes:
              2 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: