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

Background validation needs to use ignore_prepare=false

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0-rc10
    • Component/s: Diagnostics, Storage
    • None
    • v4.4
    • Execution Team 2020-07-13, Execution Team 2020-08-10, Execution Team 2020-09-07, Execution Team 2020-09-21, Execution Team 2020-10-05
    • 62

      Currently, foreground and background validation both use ignore_prepare=true. This is required for foreground validation not to deadlock on secondaries, and since it holds a strong lock there is no issue with prepared transactions concurrently committing while foreground validation is running.

      For background validation, prepared transactions can commit concurrently when the validation is running. Because snapshot isolation does not apply to prepared transaction writes when a reader is using ignore_prepare=true, the validation can mistakenly report a data corruption problem between indexes and collections updated in the same prepared transaction. For this reason, we must change ignore_prepare to be false when background validation is running. This could be problematic, however, since background validation currently stops replication application while it is running, so any encounters with prepare conflicts will cause a deadlock without further code logic changes.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: