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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Repl 2020-12-28, Repl 2021-01-25

      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.

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

              Created:
              Updated:
              Resolved: