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

Background indexes on primaries should advance the minimumVisibleSnapshot when they begin

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • Affects Version/s: 3.7.5
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-05-07
    • 56

      Starting a background index build on a primary does not set the minimumVisibleSnapshot on the collection until the index build finishes. If a reader 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.

      From SERVER-34494:

      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.

      This should be changed for all background index builds, not just on secondaries.

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

              Created:
              Updated:
              Resolved: