[SERVER-43711] ValidateAdaptor::validateIndexKeyCount should not compare in-memory and persisted checkpoint _id index entry counts Created: 30/Sep/19 Updated: 29/Oct/23 Resolved: 04/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (Inactive) |
| 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 2019-10-07 | ||||||||
| Participants: | |||||||||
| Description |
|
ValidateAdaptor::validateIndexKeyCount is called during collection validation here and we pass in the Collection's RecordStore's numRecords() return value that is an in-memory counter. This is then compared against validation's IndexConsistency's recorded number of traversed index entries (numTotalKeys) here. IndexConsistency builds this entry count from prior validation work in ValidateAdaptor::traverseIndex, where we iterate a cursor and maintain a count of entries in the IndexConsistency object. For background validation, that cursor will be a checkpoint cursor, and then we will compare it against the in-memory Collection's count, which is wrong. |
| Comments |
| Comment by Githook User [ 04/Oct/19 ] |
|
Author: {'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@mongodb.com'}Message: |
| Comment by Dianna Hohensee (Inactive) [ 30/Sep/19 ] |
|
Actually, we traverse the collection table in order to validate its contents, so I think we could save that value in the validation state to later use to compare against the index counts, instead of fetching the in-memory count that won't work for background:true. I'll try that solution, rather than skipping that validation step for background validation. |