Currently validate doesn't remove any documents if there are duplicate records with matching index entries. When we have duplicate records that are both missing index entries in a unique index, we want to only keep one to insert into the index and the other is moved to lost and found. Usually we would want to remove the older document and keep the new one. Even if it's not the case, the users can still find the removed document in lost-and-found collection.
This solution may be more arbitrary for clustered indexes as the record id can be specified by the user. But we should just make the solution consistent and warn users about it.
- is duplicated by
-
SERVER-62258 Add heuristic when repairing duplicate missing index entries to keep document with highest recordId
-
- Closed
-