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

Advancing lastDurable irrespective of lastApplied

    • Replication
    • Fully Compatible
    • v4.4
    • Repl 2020-08-24, Execution Team 2020-10-19, Repl 2023-12-11, Repl 2023-12-25
    • 33

      lastDurable is set asynchronously from lastApplied. This can cause us to attempt to advance lastDurable beyond lastApplied. When we attempt to advance lastDurable beyond lastApplied, we skip advancing lastDurable. This can increase latency for w:"majority" writes, which wait for lastDurable to advance on a majority. It also causes odd behavior, where w:1,j:true writes return success, but durableOpTime in replSetGetStatus is not updated. When we attempt to advance lastDurable beyond lastApplied, we should advance lastDurable .

       

      Original description:

      The comments surrounding this log line suggest that this is unexpected behavior:

      https://github.com/mongodb/mongo/blob/r4.4.0-rc3/src/mongo/db/repl/member_data.cpp#L163-L173

      Observed on an internal cluster with a primary running 4.4.0-rc3 and secondaries on 4.2.1. Happy to increase logging level if it would be helpful to understand the behavior here.

      cc tess.avitabile

            Assignee:
            kishore.devireddy@mongodb.com Kishore Devireddy
            Reporter:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Votes:
            0 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: