Professional Documents
Culture Documents
Advantages
- autonomy
- resource sharing
- high performance
- high reliability
- flexibility
Disadvantages
increased complexity in
- atomic commitment
- concurrency control
- recovery management
2PC-1
UVA
Distributed Recovery
Nature of failure
- all or nothing in a centralized system
- partial operability in distributed systems:
partial failure vs total failure
- partial failures are tricky to deal with since
operational sites are uncertain about the state of
sites either failed or it cannot communicate with
- operational sites may need to be blocked
2PC-2
UVA
Atomic Commitment
Transaction commit
- consistent termination of transaction is an issue:
atomic commitment protocols (ACP)
- an important goal of ACP is to minimize the effect
of failures on operational sites ability to continue
2PC-3
UVA
Properties of ACP
2PC-4
UVA
Commit point
- a point reached during the execution of a transaction
at which its fate is determined
"From a certain point onward, there is no longer any
turning back. That is the point that must be reached."
- Kafka
Commit
- unconditional guarantee to execute the transaction
to completion, even in the events of failures
Abort
- unconditional guarantee to back out the transaction
so that none of its effect persist in the database
2PC-5
UVA
Irreversible decision
- both commit and abort are irreversible
- if failure occurs before the commit point, then
upon recovery, it must be aborted
- in distributed databases, the task of ACP is
to enforce global atomicity --- unanimity
Why difficult?
- in the absence of failures, unanimous consensus
protocol is rather easy to achieve
- challenge is to find protocols ensuring atomicity
in various types of failure situations
Types of failures
- site (node) failures
- communication link failures
2PC-6
UVA
Blocking
- although it preserves consistency, it is undesirable
- locks cannot be released, making data inaccessible
Window of uncertainty
- period of time during which participants cannot
make unilateral decision
2PC-7
UVA
2PC-8
UVA
2PC-8
UVA
Independent recovery
- ability of a recovering process to reach a decision
without communicating with other processes
- very attractive, but not quite feasible
- possible to design an ACP without uncertainty period?
it requires that a process casts its vote and learns
the votes of all others all at once; not possible
Theorem 1:
If communication failures or total failures are
possible, every ACP may cause blocking processes
Theorem 2:
NO ACP can guarantee independent recovery of
failed processes
2PC-10
UVA
Evaluation of ACP
2PC-11