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

Fix concurrency bug in OplogStones

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2023-02-06

    Description

      If a truncate of the oplog occurs (
      WiredTigerRecordStore::OplogStones::clearStonesOnCommit), it first: * Sets the number of current records and bytes for the new OplogStone to 0

      • Acquires the modification mutex
      • Clears the stones list

      Modifying the first two variable outside of the lock could potentially lead to an invalid state since other OplogStones modifications first take the mutex then perform the other modifications.

      We should protect the first two variables under the mutex to avoid potential invalid states. The attached patch fixes this.

      Attachments

        Activity

          People

            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: