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

kMajorityCommitted ReadSource should not have special treatment in RecoveryUnit

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0
    • None
    • Fully Compatible
    • Execution Team 2020-10-19, Execution Team 2020-11-02

    Description

      kMajorityCommitted is special in that it requires a call to obtainMajorityCommittedSnapshot(), which just returns a Status and sets _majorityCommittedSnapshot. That snapshot (now Timestamp) is a lie, however, because the variable is overwritten when a transaction is actually opened. There can't be any callers that depend on the getPointInTimeReadTimestamp() being accurate, because the Timestamp can advance between that call and opening a transaction.

      This confuses the RecoveryUnit API unnecessarily and is an exception to how every other ReadSource operates.

      I propose the following improvements:

      • Replace obtainMajorityCommittedSnapshot() with a const function that only returns a Status. Name it majorityCommittedSnapshotAvailable
      • Remove _majorityCommittedSnapshot and use _readAtTimestamp like every other ReadSource.

      Attachments

        Activity

          People

            brian.deleonardis@mongodb.com Brian DeLeonardis (Inactive)
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: