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

Advancing lastDurable should advance lastApplied

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      Repl 2020-08-24, Execution Team 2020-10-19
    • Linked BF Score:
      33

      Description

      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 both lastDurable and lastApplied.

       

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-repl Backlog - Replication Team
              Reporter:
              kelsey.schubert Kelsey T Schubert
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated: