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

Transition to primary writes minValid doc with timestamp lastApplied with readers on the same timestamp under lock free reads

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0
    • None
    • None
    • Fully Compatible
    • Repl 2020-12-28, Repl 2021-01-25

    Description

      The step up process is clearing appliedThrough by writing to the minValid document at timestamp lastApplied.
      https://github.com/mongodb/mongo/blob/d5743ba8411a50534d33bc2e940377fb003dccea/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L503-L510

      With lock free reads, holding the RSTL in exclusive mode is not blocking readers. So secondaries may have readers on timestamp lastApplied.

      This is causing an assert in WiredTiger that we are writing to a timestamp that we have active readers on.

      The problem is reproducible by running test jstests/replsets/read_operations_during_step_up.js with LockFreeReads enabled.

      Attachments

        Issue Links

          Activity

            People

              samy.lanka@mongodb.com Samyukta Lanka
              henrik.edin@mongodb.com Henrik Edin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: