[SERVER-61393] Return all duplicates when trying to convert to a unique index Created: 10/Nov/21  Updated: 29/Oct/23  Resolved: 03/Dec/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Task Priority: Major - P3
Reporter: Yuhong Zhang Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-61392 Create CannotEnableIndexConstraint er... Closed
Problem/Incident
causes SERVER-61854 Move collmod_convert_to_unique_violat... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Execution Team 2021-11-15, Execution Team 2021-11-29
Participants:

 Description   

We should return the id and duplicate key of all the documents violating the uniqueness constraints when scanning the index before converting it and throw CannotEnableIndexConstraint



 Comments   
Comment by Githook User [ 03/Dec/21 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-61393 Throw CannotEnableIndexConstraint on unique conversion failure
Branch: master
https://github.com/mongodb/mongo/commit/ee6a048b13aacee84478389d2b212af7e534292d

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