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

Potential bug in rollbacks when running with auth



    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: Replication, Security
    • Labels:
    • Operating System:


      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.


          Issue Links



              kristina Kristina Chodorow
              spencer Spencer Brody
              0 Vote for this issue
              4 Start watching this issue