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

MongoDB does not guarantee that rollback doesn't happen

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • mongodb-2.6, mongodb-3.0
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      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

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

              Created:
              Updated:
              Resolved:
              9 years, 2 weeks ago