It looks like foreground validation holds a writer lock (MODE_X) only because it does a persisted collection stats update here. Otherwise, it just reads and could hold a MODE_S lock.
Background validation runs on a checkpoint, so it cannot perform any stats updates – they would be stale. So rather than a MODE_IX lock, we should be able to hold a MODE_IS collection lock for background collection validation. This would also obviate needing special handling for admin DB collections in the validate command with {background:true}, because for admin DB lock requests, we upgrade a MODE_IX DB lock request to a MODE_X DB lock request.
- is depended on by
-
SERVER-42358 Add background collection validation to test suites
- Closed