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

Upgrade to 6.0 should not allow yielding while holding the ScopedRangeDeleterLock (6.0 only)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 6.0.0-rc12
    • None
    • None
    • ALL
    • v6.0

    Description

      Currently, the index scan for setting the orphan document count during upgrade to 6.0 is taking the ScopedRangeDeleterLock (which will take global in IX, config.rangeDeletions in IX, and RangeDeleterCollLock::<collection UUID> in mode X. We then perform and index scan in which we pass the yield policy YIELD_AUTO. Yield auto will yield after a WriteConflictException, after a certain amount of time has passed, or after a certain number of documents have been fetched. When yielding, we will release and reacquire all locks, including the ones for the ScopedRangeDeleter lock. In this case, a range deletion could acquire the ScopedRangeDeleterLock in the middle of the index scan and change the orphan documents, thus messing up the count of orphan documents.
      We should change the yield policy to NO_YIELD to ensure the locks aren't released during the index scan.

      Attachments

        Activity

          People

            allison.easton@mongodb.com Allison Easton
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: