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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.4, 3.6.18, 4.3.4, 4.0.17
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0, v3.6
    • Sprint:
      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

          Issue Links

            Activity

              People

              Assignee:
              vesselina.ratcheva Vesselina Ratcheva
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: