[SERVER-12294] Better error message when starting 2.4 with a 2.6 admin DB Created: 08/Jan/14  Updated: 10/Dec/14  Resolved: 07/Mar/14

Status: Closed
Project: Core Server
Component/s: Logging, Security
Affects Version/s: 2.4.9
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Andreas Nilsson Assignee: Andreas Nilsson
Resolution: Won't Fix Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   

If 2.4 server is started with not properly downgraded 2.6. DB files the user document format it not recognized which is expected behavior.

However if there are multiple users with the same name in different DBs the 2.4 won't start at all complaining that the unique index invariant has been broken on the admin.system.users collection.

Make this error message more clear indicating a version mismatch between the server and the DB files. Given how long 2.4.x will be around it might make sense to get this in place to avoid confusion.



 Comments   
Comment by Andreas Nilsson [ 28/Jan/14 ]

Tue Jan 28 17:45:34.615 [initandlisten] build index admin.system.users { user: 1, userSource: 1 }
Tue Jan 28 17:45:34.622 [initandlisten] Duplicate key exception while trying to build unique index on admin.system.users.  You most likely have user documents with duplicate "user" fields.  To resolve this, start up with a version of MongoDB prior to 2.4, drop the duplicate user documents, then start up again with the current version.
Tue Jan 28 17:45:34.622 [initandlisten] exception in initAndListen: 11000 E11000 duplicate key error index: admin.system.users.$user_1_userSource_1  dup key: { : "user", : null }, terminating

Comment by Daniel Pasette (Inactive) [ 26/Jan/14 ]

Don't think it's worth adding the logic into 2.4.10 for this case, but leaving open for now with 2.4.10 fixVersion. andreas.nilsson@10gen.com, can you paste the error you get in 2.4 into the ticket description?

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