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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 2.6.0-rc1
    • Fix Version/s: 2.6.0-rc2
    • Component/s: Index Maintenance
    • Labels:
      None
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: