[SERVER-43678] Background collection validation should take a MODE_IS collection lock instead of MODE_IX Created: 27/Sep/19 Updated: 29/Oct/23 Resolved: 30/Sep/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Task | 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 |
|
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. |
| Comments |
| Comment by Githook User [ 30/Sep/19 ] |
|
Author: {'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@mongodb.com'}Message: |