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.

    • Fully Compatible
    • ALL
    • v4.2, v4.0, v3.6
    • Repl 2020-02-10, Repl 2020-02-24

      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.

       

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

              Created:
              Updated:
              Resolved: