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

makeNoopWriter crashes when the last applied optime advances in the face of failed appendOplogNotes.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0-rc4, 3.7.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2017-11-13, Sharding 2017-12-04
    • Linked BF Score:
      0

      Description

      I believe this is 3.6 required.

      makeNoopWriteIfNeeded (in read_concern.cpp) will ensure an oplog document exists on the primary with at least the clusterTime. This guarantees the secondary will eventually apply up to the requested clusterTime.

      This method can succeed in two(ish) cases.

      1. The method successfully sends a appendOplogNote to the primary with the requested cluster time. The caller can wait for this document to come down the pipe with confidence.
      2. While making requests that are not succeeding, the lastAppliedOpTime continues to advance. If it advances beyond the requested clusterTime, there's no need to make further requests.
      3. A generalization of the previous point, a request may never need to be made, and the method will immediately return.

      The method initializes a return status of OK. Some error cases will immediately return an error code, such as not finding the correct shard, or the number of retries to make the request has been exceeded. Otherwise status is assigned the latest result of the request.

      However, when a request fails, leaving status in an error state, the lastAppliedOpTime is refreshed. If this new value exceeds the requested clusterTime, the loop will exit, but the code invariants that the status is ok.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              misha.tyulenev Misha Tyulenev
              Reporter:
              daniel.gottlieb Daniel Gottlieb
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: