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

node can't roll back if behind minValid

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None

      Description

      Consider a replica set with three members at this state of oplogs:

      S1: 1 2 3 4 5 6 7 8 9 (primary)
      S2: 1
      S3: 1 2 3 4 5

      now suppose S2 starts applying the batch 2..9. It early commits

      {2,4,6,8} ops. It then crashes.

      after crashing, the oplog for S2 is unchanged, but writes have occurred to the datafiles for opids {2,4,6,8}

      .

      On restart, S2 would recover ok (if it's idempotent) if S1 is up. However, suppose S1 goes down first (perhaps permanently). Now S2 and S3 are the remaining set members on S2's restart. S3 has the latest data. After recovery we have:

      S1: down
      S2: 1 2 3 4 5 (+

      {6,8} applied but not in oplog)
      S3: 1 2 3 4 5

      *However S2 has also written ops {6,8}

      and they are never rolled back.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: