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

kMajorityCommitted ReadSource should not have special treatment in RecoveryUnit

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Execution Team 2020-10-19, Execution Team 2020-11-02

      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.

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

              Created:
              Updated:
              Resolved: