3 - Nonblocking Commit Protocols
3 - Nonblocking Commit Protocols
3 - Nonblocking Commit Protocols
-This paper also introduced central site nonblocking protocol and decentralized site
nonblocking protocol.
Background
-Researchers have started to focus on distributed database systems since late 70s.
-Some operations on the data are logically indivisible, and these operations are called
transactions.
Background
-Atomic operation: either executes to completion or it appears never to have
executed. By definition, transaction on distributed database system is atomic
operation.
-The gap between logical atomicity and physical atomicity causes significant
problems in distributed database implementation.
Background
-Preserving transaction atomicity is well understood in single site case.
-A protocol that never requires operational sites to block until a failed site has
recovered is called a nonblocking protocol.
Termination and Recovery Protocols
-Termination Protocol: to terminate transaction execution as quickly as possible at
the operational sites.
-The states of the FSA for site i are called local states of site i.
-State of transition: reading, writing, and moving to the next local state.
FSA for Two Phase Commit Protocol
-Each FSA has four (local) states: initial (qi),
wait (wi), abort (ai), and commit (ci).
-The final states of the FSA’s are partitioned into two sets: the abort states, and the
commit states.
-A global state is said to be inconsistent if it contains both a local commit state and a
local abort state.
Global Transaction States
-A global state is said to be a final state if all local states contained in the state
vector are final states.
-The concurrency set of si state is the set of all local states sj, where i≠j, such that
si and sj are contained in the same reachable global state.
Committable States
-A local state is called committable if occupancy of that state by any site implies that
all sites have voted yes on committing the transaction.
-For nonblocking protocol: have more than one committable state (assert in paper
and without proof)
The Central Site Class Commit Protocol
-The central site class: uses one site (coordinator) to direct transaction processing at
all participating sites (slaves).
-Properties:
1) Single coordinator;
-Synchronous within one state transition: one site never leads another site by more
than one state transition during the execution of the protocol.
The Decentralized Class Commit Protocol
-The (fully) decentralized class: each site participates as an equal in the protocol and
executes the same protocol.
-Process: each site will send the identical message to every other site, then waits
until it has received messages from all its cohorts.
Decentralized Two Phase Commit Protocol
-Simplest decentralized commit protocol.
1) there exists no local state such that its concurrency set contains both an
abort and a commit state;
coordination slave
Nonblocking Decentralized Protocol
-All protocols are the canonical nonblocking protocol.
Termination Protocols
-Site failures may occur and would make the continued execution of the commit
protocol impossible. Solution: termination protocol.
-A termination protocol can accomplish its task only if the current state of at least
one operational site obeys the conditions given in the fundamental nonblocking
theorem.
-But in the worst case, it will be able to terminate correctly only if all of the
operational sites obey the fundamental nonblocking theorem.
Central Site Termination Protocol and Backup
-Choose a backup coordinator from the set of operational sites.
-The backup coordinator will complete the transaction by directing all the remaining
sites toward a commit or an abort. The protocol must be reentrant.
-Decision Rule For Backup Coordinators: If the concurrency set for the current
state of the backup contains a commit state, then the transaction is committed.
Otherwise, it is aborted.
-Termination protocol