[SERVER-49103] Validate repair mode should fix up missing and extra index entries Created: 25/Jun/20  Updated: 29/Oct/23  Resolved: 06/Aug/20

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

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

Issue Links:
Depends
depends on SERVER-49340 Add repair mode to validate for start... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2020-07-27, Execution Team 2020-08-10
Participants:

 Description   

As a part of collection validation, we gather index entry errors for error reporting purposes.

Since we always assume the collection data is a source of truth, during --repair we can use this information to fix up indexes without requiring a full index rebuild.



 Comments   
Comment by Githook User [ 06/Aug/20 ]

Author:

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

Message: SERVER-49103 Validate repair mode should fix up missing and extra index entries
Branch: master
https://github.com/mongodb/mongo/commit/84ae2755904df75ea8ab79e0595227b04bf02251

Comment by Louis Williams [ 26/Jun/20 ]

daniel.gottlieb, good point. SERVER-39562 is intended to specifically address the unique key problem, however, I suspect that these two tickets will have some overlap.

Comment by Daniel Gottlieb (Inactive) [ 26/Jun/20 ]

Possible edge case: there are times where the collection data is wrong, e.g: multiple documents with the same _id. If failing to handle that case leads to a crash because of a duplicate key exception (as we've seen during replication recovery when there's index/collection inconsistency), that would make --repair less robust.

Then again, I'm not sure if the current --repair semantics to rebuild the _id and other unique indexes are robust to that today.

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