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

Background index builds on secondaries should set the collection minimumVisibleSnapshot when they start

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.5
    • 3.7.4
    • Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-04-23
    • 18

    Description

      During batch application, starting a background index build on a secondary does not set the minimumVisibleSnapshot on the collection until the index build finishes. If a secondary reader without the PBWM lock reads at a timestamp A before an index build timestamped for B, a reader may iterate through the indexes for a collection and reach this invariant.

      The problem is that _setupInMemoryStructures is called before the actual catalog entry is updated on disk, so a reader may see an in-memory state inconsistent with the state on disk. This can be prevented by updating the minimumVisibleSnapshot on the collection to force readers to wait for a later timestamp.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: