[SERVER-46410] Validate should check for duplicate keys in unique indexes Created: 25/Feb/20  Updated: 29/Oct/23  Resolved: 03/Mar/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.6, 4.3.5

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Execution Team 2020-03-09
Participants:

 Description   

When "validate" checks index inconsistencies, it asserts that keys are in increasing order. It should also perform checks to detect duplicate keys on unique indexes.

Additionally, all KeyStrings are in the format (Key, RecordID). If there are two KeyStrings with duplicate Keys, each will have unique RecordID, and therefore never compare equally. This should be a consideration in the implementation.



 Comments   
Comment by Githook User [ 07/Apr/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-46410 Validate should check for duplicate keys in unique indexes

(cherry picked from commit 8cdcfd2ab0d28dca863557a02cafc86ae80f960e)
Branch: v4.2
https://github.com/mongodb/mongo/commit/9a006465144ac8d3d3a3ccd6c7285ad6fa3b30dc

Comment by Githook User [ 03/Mar/20 ]

Author:

{'username': 'louiswilliams', 'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com'}

Message: SERVER-46410 Validate should check for duplicate keys in unique indexes
Branch: master
https://github.com/mongodb/mongo/commit/8cdcfd2ab0d28dca863557a02cafc86ae80f960e

Generated at Thu Feb 08 05:11:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.