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

Rollback via refetch can cause rollback to happen successfully w/o updating the rollback id.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.2.4, 3.6.18, 4.3.4, 4.0.17
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0, v3.6
    • Repl 2020-02-10, Repl 2020-02-24

    Description

      Our current rollback via refetch currently increments the rollback id only after the completion of rollback (i.e. only after truncation of oplog). Consider a below scenario.

      1) syncFixup() // rollback + Truncates the oplog.
                         ---> ***Unclean shutdown happens here***
      2) incrementRollbackID() // Persists the updated Rollback ID.

      On node restart, since we have truncated the oplog, the node doesn't transition to rollback state again. So, we don't increment the rollback id. This can lead to nodes silently completing the rollback without the other nodes knowing about it.

      There are places in rollback and initial sync, we do check that sync source haven't rolled back during the process of rollback/initial sync using this rollback id. so, its necessary to update the rollback id on rollback success.

      Note: It's not problem for rollback via RTT as we currently increment the rollback id before the rollback start/oplog truncation.

       

      Attachments

        1. repro.patch
          4 kB
          Suganthi Mani

        Issue Links

          Activity

            People

              vesselina.ratcheva@mongodb.com Vesselina Ratcheva
              suganthi.mani@mongodb.com Suganthi Mani
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: