[SERVER-27082] validate() can't catch certain corruptions within index structure on MMAPv1 Created: 17/Nov/16 Updated: 06/Dec/22 Resolved: 14/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MMAPv1, Storage |
| Affects Version/s: | 3.3.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Storage Execution
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
validate() currently does an index scan of all the documents in a collection. It does not traverse every edge in the index tree structure. As a result, it's possible to corrupt the tree such that validate() will still succeed but querying for specific document(s) will fail. This behavior has been observed with the MMAPv1 storage engine. |
| Comments |
| Comment by Kevin Pulo [ 25/Nov/16 ] |
|
One possibility might be to do a DFS of the tree concurrently with the existing walk of the index entry linked list. At each step, the code would verify that the DFS and linked list iterators are both referring to the same index entry. This should exercise all the internal edges in the tree, and notice if any of them have gone awry. |
| Comment by Eric Milkie [ 21/Nov/16 ] |
|
We should think about whether a simple validation of the btree sorted structure would help here. |