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

Initial sync criteria needs to check minValid, not the oplog

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.2.2
    • 2.3.2
    • Replication
    • None
    • ALL

    Description

      The criteria for initiating an initial sync currently checks to see if no ops are in the oplog. This worked fine until we started adding ops as part of initial sync in order to fix index unique constraint violations.
      If you were to crash after cloning dbs but before generating indexes, it would be possible to restart the node and have it go straight into SECONDARY without completing the index builds.

      Instead, the criteria should be whether the node has a minValid set. minValid is not set until the very end of initial sync after everything has successfully completed.
      As a sanity check, the node should fassert if it finds that minValid exists but there are no ops in the oplog, as this situation should be impossible.

      Attachments

        Issue Links

          Activity

            People

              kristina Kristina Chodorow (Inactive)
              milkie@mongodb.com Eric Milkie
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: