At the start of collection validation, we open collection and index cursors. If an index's (by name) persisted ident differs from the latest index (by name) ident, then it must be skipped.
Currently, we read a PIT view of persisted collection catalog entry to find the index names. Then, we iterate through the in-memory indexes, filter out any that aren't in the persisted PIT view, then open and save cursors on the remaining indexes.
The filtering out of indexes that are not in the PIT view is necessary for validate with {background:true} where we read from the checkpoint view. However, we have a bug when an index gets checkpoint'ed, then the index is dropped (deferred, 1st phase of drop), then the index is recreated. It will appear in the checkpoint's catalog view, but then we'll read from the recreated index instead that is not checkpoint'ed. Apparently, the current behavior here is to successfully read from the recreated index even if we ask for a kCheckpoint read source. Therefore, we should filter out any indexes from the PIT persisted view that has an ident that no longer matches the in-memory representation of that index (i.e. the index was recreated and is not in the checkpoint).
- is depended on by
-
SERVER-42358 Add background collection validation to test suites
- Closed
- related to
-
SERVER-56877 insert operations may fail to set index to multikey after aborted multikey catalog update
- Closed