[SERVER-50081] Support validation repair mode with duplicates on unique indexes Created: 03/Aug/20  Updated: 29/Oct/23  Resolved: 28/Jan/22

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

Type: Improvement Priority: Major - P3
Reporter: Shin Yee Tan Assignee: Shin Yee Tan
Resolution: Fixed Votes: 0
Labels: newgrad
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-12-13, Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24, Execution Team 2022-02-07
Participants:

 Description   

Currently when there are duplicate documents in the RecordStore but no matching key in a unique index, validate repair mode is unable to insert the missingIndexEntry and thus unable to repair this in validate repair mode.

In this scenario, we might want to delete the duplicate document.

This feature is different from SERVER-49507, which only deals with index rebuilds after salvaging data files.

Also, remove the TODO here.



 Comments   
Comment by Githook User [ 28/Jan/22 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-50081 Remove duplicate documents of unique indexes in repair mode
Branch: master
https://github.com/mongodb/mongo/commit/cf244b1424284ee337406849c791029370d28234

Comment by Louis Williams [ 26/Aug/20 ]

I'm going to take this out of the project and put in the backlog because this scenario currently falls back on the work done in SERVER-49507 to rebuild indexes when validation fails.

It would be nice to have for completeness, but it will be mostly duplicating the effort in SERVER-49507.

In addition, I have not seen any duplicate key validation failures in the wild, with the exception of the file salvage case that is already handled by SERVER-49507.

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