Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43678

Background collection validation should take a MODE_IS collection lock instead of MODE_IX

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2019-10-07

      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.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: