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

Mixed-version 2.4/2.6 replica set crashes due to different rules for ensureIndex

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc1
    • Component/s: Index Maintenance
    • None
    • ALL

      If you are running a mixed-mode 2.4/2.6 replica set and you execute an ensureIndex on a 2.4 primary with an index definition that does not match the existing definition, the 2.6.1-rc0 secondary will die with the following:

      2014-03-14T09:50:17.507-0700 [repl writer worker 4] ERROR: writer worker caught exception:  :: caused by :: 67 Index with name: nameIdx already exists with different options on: { ts: Timestamp 1394815817000|467, h: -4991379662634739239, v: 2, op: "i", ns: "mmsdbconfig.system.indexes", o: { _id: ObjectId('53233349c421b4c92f255cf9'), ns: "mmsdbconfig.config.customers", key: { n: 1.0 }, name: "nameIdx", unique: true } }
      2014-03-14T09:50:17.507-0700 [repl writer worker 4] Fatal Assertion 16360
      2014-03-14T09:50:17.507-0700 [repl writer worker 4] 
      
      ***aborting after fassert() failure
      

      To Reproduce

      1. Create mixed version replica set with 2.4 as the primary.

      2. On the primary

      db.users.ensureIndex({username:1},{name: 'idxUsername'})
      db.users.ensureIndex({username:1},{name: 'idxUsername', unique:true})
      

      The 2.4 primary will ignore the second ensureIndex. However, the generated oplog will cause the secondary to crash with the above error.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            cailin.nelson@mongodb.com Cailin Nelson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: