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.
- is depended on by
-
SERVER-42358 Add background collection validation to test suites
- Closed