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

recover locks on step up at the beginning of the state transition rather than at the end

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.12
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Storage NYC 2019-05-06, Storage NYC 2019-05-20

      Description

      Prepared transactions hold collection and database IX locks across state transitions, and can only release those locks by processing a 'commitTransaction' or 'abortTransaction' command. It is very possible that in order to receive a 'commitTransaction' or 'abortTransaction' command, a node must go through a state transition to step up or down. Thus we cannot just wait for the prepared transaction to release its locks to acquire locks for the state transition.

      This means that state transitions cannot acquire locks that would conflict with locks held by a prepared transaction.

      The only state transition that I know of that acquires locks is step-up.

      Shutdown does not count as a state transition. It aborts all prepared storage transactions without making that abort durable in any way before acquiring any locks. This occurs after shutting down the replication system (though before killing all operations), so I think it should be safe.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregory.wlodarek Gregory Wlodarek
              Reporter:
              judah.schvimer Judah Schvimer
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: