Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5185

MongoDB does not guarantee that rollback doesn't happen

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • mongodb-2.6, mongodb-3.0
    • None
    • manual
    • None

    Description

      This is claimed in docs at http://docs.mongodb.org/manual/core/replica-set-rollbacks/ and in the quiz for the Recovery section of M102. It isn't true.

      From the docs: "To prevent rollbacks, use replica acknowledged write concern to guarantee that the write operations propagate to the members of a replica set."

      From M102: "MongoDB has a method to ensure a write was replicated and will never need to be rolled back:"

      Failure scenario in which commit was visible to another client on the master and then is removed during rollback.

      1) Client 1 commits to journal on master and waits.
      2) Client 2 views commit from client 1 by doing read on master.
      3) Master reboots.
      4) Replica 2 elected new master, it didn't get oplog entry from step 1
      5) Old master comes back, does rollback to remove change from step 1

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            mdcallag Mark Callaghan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 43 weeks ago