MongoDB Documentation, Release 3.0.4 If you have an existing data set and want to disable the default index key length validation so that you can upgrade before resolving these indexing issues, use the failIndexKeyTooLong parameter. Previous versions did not create the index but did not error. Write Method Acknowledgements ensureIndex and Existing Indexes Index Specifications Validate Field Names • Secondaries allow index build and rebuild operations on a collection that contains an indexed field whose corresponding index entry exceeds the limit but with warnings in the logs. • With mixed version replica sets where the secondaries are version 2.6 and the primary is version 2.4, secondaries will replicate documents inserted or updated on the 2.4 primary, but will print error messages in the log if the documents contain an indexed field whose corresponding index entry exceeds the limit. Solution Run db.upgradeCheckAllDBs() to find current keys that violate this limit and correct as appropriate. Preferably, run the test before upgrading; i.e. connect the 2.6 mongo shell to your MongoDB 2.4 database and run the method. Description In MongoDB 2.6, create and re-index operations fail when the index key refers to an empty field, e.g. "a..b" : 1 or the field name starts with a dollar sign ( $ ). • db.collection.ensureIndex() will not create a new index with an invalid or empty key name. • db.collection.reIndex() , compact , and repairDatabase will error if an index exists with an invalid or empty key name. • Chunk migration will fail if an index exists with an invalid or empty key name. Solution Run db.upgradeCheckAllDBs() to find current keys that violate this limit and correct as appropriate. Preferably, run the test before upgrading; i.e. connect the 2.6 mongo shell to your MongoDB 2.4 database and run the method. Previous versions of MongoDB allow the index. Description db.collection.ensureIndex() now errors: • if you try to create an existing index but with different options; e.g. in the following example, the second db.collection.ensureIndex() will error. • if you specify an index name that already exists but the key specifications differ; e.g. in the following example, the second db.collection.ensureIndex() will error. db.mycollection.ensureIndex( { x: 1 } ) db.mycollection.ensureIndex( { x: 1 }, { unique: 1 } ) db.mycollection.ensureIndex( { a: 1 }, { name: "myIdx" } ) db.mycollection.ensureIndex( { z: 1 }, { name: "myIdx" } ) 857 12.2. Previous Stable Releases Description The mongo shell write methods db.collection.insert() , db.collection.update() , db.collection.save() and db.collection.remove() now integrate the write concern (page 78) directly into the method rather than with a separate getLastError command to provide safe writes (page 78)