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

Potential bug in rollbacks when running with auth

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.3.1
    • Component/s: Replication, Security
    • Labels:
      None
    • ALL

      jstests/replsets/rollback2.js and rollback3.js are failing when run with authentication enabled.

      From a git bisect, I found the first commit where the test is failing to be:

      commit 07a6fd4726a8e876266319cd8d22d64111cf8688
      Author: Kristina <kristina@10gen.com>
      Date:   Thu Oct 4 15:18:29 2012 -0400
      
          SERVER-1929 Remove unused heartbeat options from stepdown logic
          
          Fixed test because stepdown is so much faster that the connection is dead
          by the time ismaster is called.
      

      It seems like that commit probably just caused the bug to manifest by changing the timings of things, rather than actually introducing the bug.

      The basic summary of what the test is doing is this:
      1) Set up a replica set with 2 nodes, A and B, and an arbiter. Do some writes, wait for them to replicated to the secondary.
      2) Isolate node A (by using the replSetTest command with the blind option), wait for node B to become primary.
      3) Do some writes to node B. These writes should be rolled back
      4) Blind node B, then unblind node A. The node Awill take over as primary, but won't see the writes from step 3.
      5) Do some new writes to node A
      6) Unblind node B. This should cause it to rollback the writes from step 3.

      The bug is that no rollback is happening in step 6. I changed the test to print the oplogs of both nodes after step 6 and node B has all the original writes, then the writes it got in step 3, and THEN the writes that node A got in step 5. B synced off A without first rolling back to a common point.

      Please let me know if there's anything I can do to help debug.

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: