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

waitForSecondaries in background dbhash check must wait for lastApplied to reach clusterTime when enableMajorityReadConcern=false

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v4.0
    • Repl 2019-02-11
    • 16

    Description

      The waitForSecondaries function in the background dbhash check waits for theĀ lastCommittedOpTime on the secondary to reach the clusterTime when enableMajorityReadConcern=false. However, the lastCommittedOpTime is the secondary's knowledge of the majority commit point and may be behind its last applied. For the atClusterTime wait for readConcern to succeed on master, the secondary's lastApplied must be at least clusterTime, so we should check replSetGetStatus.optimes.appliedOpTime. For the atClusterTime wait for readConcern to succeed on 4.0, the secondary's current committed snapshot must be at least clusterTime, so we should check replSetGetStatus.optimes.readConcernMajorityOpTime. Note that readConcernMajorityOpTime may be ahead of appliedOpTime on master.

      Attachments

        Activity

          People

            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: