[SERVER-13206] Mixed-version 2.4/2.6 replica set crashes due to different rules for ensureIndex Created: 14/Mar/14  Updated: 11/Jul/16  Resolved: 17/Mar/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.6.0-rc1
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Critical - P2
Reporter: Cailin Nelson Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-13404 2.6 secondaries abort when replicated... Closed
related to SERVER-13496 Creating index with same name but dif... Closed
Operating System: ALL
Participants:

 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.



 Comments   
Comment by Githook User [ 17/Mar/14 ]

Author:

{u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-13206: do not abort secondary on index creation conflict
Branch: v2.6
https://github.com/mongodb/mongo/commit/7e2f84ae565d5cb7136f0db0fadf42ff4259f280

Comment by Githook User [ 17/Mar/14 ]

Author:

{u'username': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-13206: do not abort secondary on index creation conflict
Branch: master
https://github.com/mongodb/mongo/commit/263cf8628ec80c74e5a59334d8998b52227a89c1

Generated at Thu Feb 08 03:30:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.