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

AutoGetCollectionForReadLockFree is checking repl state multiple times without holding RSTL

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-12-14, Execution Team 2020-12-28
    • 15

    Description

      SnapshotHelper::shouldReadAtLastApplied is called explicitly from AutoGetCollectionForReadBase and via SnapshotHelper::getNewReadSource. It is checking ReplicationCoordinator::canAcceptWritesForDatabase which can change as we're not holding the RSTL. A different answer would trigger the following fassert: https://github.com/mongodb/mongo/blob/51e3e36ac48cac80c920e5e418013fdb0a6747f2/src/mongo/db/db_raii.cpp#L262-L265

      Attachments

        Activity

          People

            henrik.edin@mongodb.com Henrik Edin
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: