[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: |
|
||||||||
| 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: |
| Comment by Louis Williams [ 26/Jun/20 ] |
|
daniel.gottlieb, good point. |
| 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. |