Global-Phase Three-Phase Commit and Partition-Cut Impossibility Steps #
This module proves two intermediate steps toward non-blocking crash recovery and network-partition
impossibility (after [Ske81] and [SS83]), not the cited message-passing 3PC
and crash-recovery endpoints (#7289):
Global-phase FSA and survivor-polling Three-Phase Commit (
3PC) step (after [Ske81], §§2–5, pp. 135–141): Inserting the committable buffer state.preCommitted(p_i) between.uncertain(w_i) and.committed(c_i) ([Ske81], §4, Figure 6, p. 139; §5, Figure 7, p. 140) separates.uncertainoperational sites from.committedsites. UnlikeTwoPCStateandCommitProtocol,ThreePCStateandthreePCStep?model centralized3PCat the global-phase FSA level via coordinator-directed phase-guarded single-site state updates (omitting in-flight message buffers), computesbackupPhaseby polling all operational survivorsalivein oneelectBackupstep (whereas [Ske81]'s Central Site Termination Protocol on p. 141 branches on the elected backup's own local state over messages), and is not yet instantiated as aCommitProtocolor extended with crash-recovery restarts or decentralized quorum3PC(#7289). Within this global-phase model we prove:- Non-blocking state invariant step (
threePC_no_uncertain_and_committed_globalPhase): in every reachable configuration ofthreePCLts, if any operational site is.initor.uncertain, then no site (operational or crashed) has decided.commit. - Safety and fault-free commit steps:
threePC_decision_stable_globalPhase,threePC_agreement_globalPhase(AC1),threePC_abort_of_vote_no_globalPhase(AC2), andthreePC_failureFree_commit_globalPhase(AC3). - Survivor termination steps (
threePCTerminate_mTr_globalPhase,threePC_nonblocking_termination_globalPhase): from every reachable configuration withs.alive.Nonempty, the operational survivors reach a unanimous decision via crash-freethreePCLtssteps without reviving any crashed site.
- Non-blocking state invariant step (
Partition-cut impossibility step over
CommitProtocol(after [SS83], §V-A, Theorem 4, p. 225, and Appendix Proof of Theorem 4, p. 227): For asynchronous point-to-point message-passing protocols (CommitProtocolwithNormalStepand group-informedTimeoutStep, without crash-recovery states, undeliverable-message notification, or a3PCinstantiation; #7289) subject to cross-group message erasurecutCfg, no protocol satisfiesCommitProtocol.IsPartitionCutResilient G₁ G₂for any nonempty disjoint groups(G₁, G₂)(not_nonblocking_atomicCommit_of_partitionCut). When2 ≤ Fintype.card P, such a simple bipartition (G₁ ∪ G₂ = Finset.univ) always exists (not_exists_partitionCutResilient_atomicCommit).
Main definitions #
Cslib.Distributed.AtomicCommit.ThreePCLocalState: local states of3PC(init,uncertain,preCommitted,committed,aborted).Cslib.Distributed.AtomicCommit.ThreePCLocalState.isCommittable: committability predicate (preCommittedorcommitted).Cslib.Distributed.AtomicCommit.ThreePCPhase,Cslib.Distributed.AtomicCommit.ThreePCState,Cslib.Distributed.AtomicCommit.ThreePCAction: coordinator phases, global configurations, and transition labels of the global-phase3PCstep.Cslib.Distributed.AtomicCommit.backupPhase,Cslib.Distributed.AtomicCommit.threePCTerminate: survivor-polling backup coordinator phase rule and termination map for the global-phase3PCstep.Cslib.Distributed.AtomicCommit.threePCStep?,Cslib.Distributed.AtomicCommit.threePCLts,Cslib.Distributed.AtomicCommit.ThreePCReachable: operationalCslib.LTSsemantics of the global-phase3PCstep.Cslib.Distributed.AtomicCommit.CommitEnvelope,Cslib.Distributed.AtomicCommit.CommitConfig,Cslib.Distributed.AtomicCommit.CommitProtocol: asynchronous point-to-point commit protocol with group-informed partition-timeout steps.Cslib.Distributed.AtomicCommit.PartitionState,Cslib.Distributed.AtomicCommit.PartitionAction,Cslib.Distributed.AtomicCommit.CommitProtocol.lts,Cslib.Distributed.AtomicCommit.CommitProtocol.IsPartitionCutResilient: operationalcutCfgpartitionLTSand partition-cut resilience predicate.
Main results #
Cslib.Distributed.AtomicCommit.threePC_decision_stable_globalPhase: local decisions are irreversible in the global-phase3PCstep.Cslib.Distributed.AtomicCommit.threePC_no_uncertain_and_committed_globalPhase: global-phase3PCstep toward Skeen's non-blocking state invariant across normal and backup-recovery steps.Cslib.Distributed.AtomicCommit.threePC_agreement_globalPhase: global-phase3PCstep towardUniformAgreement(AC1) across operational and crashed sites.Cslib.Distributed.AtomicCommit.threePC_abort_of_vote_no_globalPhase: global-phase3PCstep towardAbortValidity(AC2).Cslib.Distributed.AtomicCommit.threePC_failureFree_commit_globalPhase: crash-free all-yesexecution of the global-phase3PCmodel reachesAllDecided _ .commit(AC3).Cslib.Distributed.AtomicCommit.threePCTerminate_mTr_globalPhase: whens.coord ∉ s.aliveandb ∈ s.alive,threePCTerminate b sis reached by a crash-freethreePCLtsexecution and decides unanimously acrosss.alivein agreement with crashed sites.Cslib.Distributed.AtomicCommit.threePC_nonblocking_termination_globalPhase: every reachableThreePCStatewiths.alive.Nonemptyterminates amongs.aliveacross recursive coordinator crashes in the global-phase3PCmodel.Cslib.Distributed.AtomicCommit.cutCfg_comm,Cslib.Distributed.AtomicCommit.CommitProtocol.IsPartitionCutResilient.symm: symmetry ofcutCfgandIsPartitionCutResilientin(G₁, G₂).Cslib.Distributed.AtomicCommit.not_nonblocking_atomicCommit_of_partitionCut: partition-cut impossibility step overCommitProtocolfor any nonempty disjoint(G₁, G₂).Cslib.Distributed.AtomicCommit.not_exists_partitionCutResilient_atomicCommit: for2 ≤ Fintype.card P, noCommitProtocolsatisfiesIsPartitionCutResilientacross all simple two-way partitions.
References #
Part I: Global-phase Three-Phase Commit (3PC) step #
Local automaton states of Skeen's Three-Phase Commit ([Ske81], §4, Figure 6, p. 139; §5, Figure 7, p. 140).
- init : ThreePCLocalState
Initial state (
q_i) prior to casting a vote. - uncertain : ThreePCLocalState
Uncertain / wait state (
w_i) after voting.yes, prior to receivingPreCommit. - preCommitted : ThreePCLocalState
Buffer "prepare to commit" state (
p_i), occupancy of which guarantees all sites voted.yeswhile still permitting coordinated abort if no survivor has committed. - committed : ThreePCLocalState
Irreversible committed state (
c_i). - aborted : ThreePCLocalState
Irreversible aborted state (
a_i).
Instances For
Decision recorded by a ThreePCLocalState (none in .init, .uncertain, and
.preCommitted).
Skeen's committability predicate ([Ske81], §2, pp. 136–137): occupancy of .preCommitted
or .committed implies every site voted .yes.
A ThreePCLocalState decides .commit iff it is .committed.
A ThreePCLocalState decides .abort iff it is .aborted.
Protocol phase directed by the active primary or backup coordinator in 3PC.
- collectingVotes : ThreePCPhase
Phase 1: sites cast their initial
.yes/.novotes. - preCommitting : ThreePCPhase
Phase 2 (or Phase 1 of backup failover when a survivor is
.preCommitted): advancing operational.uncertainsites into.preCommittedbefore any site commits. - committing : ThreePCPhase
Phase 3: advancing operational
.preCommittedsites into.committedonce all operational sites are committable. - aborting : ThreePCPhase
Coordinated abort broadcast to undecided operational sites.
Instances For
Global configuration of Skeen's 3PC in the fail-stop accurate-timeout model.
- coord : P
Currently designated coordinator (primary initially; updated by
electBackupon crash). - phase : ThreePCPhase
Active phase of
coord. - alive : Finset P
Operational (non-crashed) sites.
- localState : P → ThreePCLocalState
Local state of each site (preserved permanently across crashes).
Decision vector of a ThreePCState across all sites (operational or crashed).
Initial global configuration of 3PC with primary coordinator coord.
Survivor-polling backup coordinator phase rule for the global-phase 3PC step (after
[Ske81], pp. 140–141, not the message-passing Central Site Termination Protocol; #7289): poll
the operational survivors alive:
- if any survivor is
.aborted, enter.aborting; - else if any survivor is
.committed, enter.committing; - else if any survivor is
.preCommitted, enter.preCommitting(running the 2-stepPreCommit → Commitround acrossalivebefore committing); - otherwise all survivors are
.initor.uncertain, so enter.aborting.
Unlike [Ske81]'s Central Site Termination Protocol on p. 141, which branches on the elected
backup coordinator's own local state and broadcasts that state over messages in Phase 1, this step
polls all survivors in alive directly (#7289).
Closed-form post-failover configuration computed when surviving backup coordinator b
completes Skeen's termination protocol across s.alive without further crashes.
Transition labels of the 3PC operational LTS.
- castVote {P : Type u_1} (p : P) : ThreePCAction P
- startPreCommit {P : Type u_1} : ThreePCAction P
Primary coordinator enters Phase 2 (
.preCommitting) once all sites inPare operational and.uncertain. - primaryAbort {P : Type u_1} : ThreePCAction P
- stepPreCommit {P : Type u_1} (p : P) : ThreePCAction P
Active coordinator delivers
PreCommitto operational.uncertainsitep. - finishPreCommit {P : Type u_1} : ThreePCAction P
Active coordinator advances
.preCommitting → .committingonce all operational sites are committable. - stepCommit {P : Type u_1} (p : P) : ThreePCAction P
Active coordinator delivers
Committo operational.preCommittedsitep. - stepAbort {P : Type u_1} (p : P) : ThreePCAction P
Active coordinator delivers
Abortto operational undecided sitep. - crash {P : Type u_1} (p : P) : ThreePCAction P
Fail-stop crash of operational site
p. - electBackup {P : Type u_1} (b : P) : ThreePCAction P
Instances For
Whether a ThreePCAction involves no new site crashes.
Partial transition function of Skeen's 3PC with fail-stop crashes and backup coordinator
failover.
Operational Cslib.LTS of the global-phase 3PC step under fail-stop crashes and survivor
polling (after [Ske81], §§2–5, pp. 135–141; #7289).
Reachability of a 3PC configuration from threePCStart P coord₀ in the global-phase 3PC
step.
Global-phase state invariant, safety, and survivor termination steps #
Global-phase FSA step toward [Ske81], §5 (pp. 140–141), not the cited message-passing 3PC
result (#7289): local decisions are irreversible along all reachable transitions of threePCLts
(normal phase steps, crashes, and backup coordinator failovers).
Global-phase FSA step toward [Ske81], §4, Theorem 1 (p. 138), not the cited message-passing
3PC result (#7289): in every reachable configuration of threePCLts (across single-site phase
steps, fail-stop crashes, and survivor-polling backup failovers), if any operational site is
.init or .uncertain, then no site—operational or crashed—has decided .commit.
Global-phase FSA step toward [Ske81], §§4–5 (pp. 138–141), not the cited message-passing
3PC result (#7289): in every reachable configuration of threePCLts, all decided sites
(operational or crashed) satisfy UniformAgreement (AC1).
Global-phase FSA step toward [Ske81], §§4–5 (pp. 138–141), not the cited message-passing
3PC result (#7289): if any site voted .no, no site decides .commit in any reachable
configuration of threePCLts (AC2).
Crash-free batch execution helpers, AC3, and non-blocking backup termination #
Global-phase FSA step toward [Ske81], §5, Figure 7 (p. 140), not the cited message-passing
3PC result (#7289): when all sites vote .yes, threePCLts admits a crash-free execution from
threePCStart P coord₀ reaching AllDecided s.decision .commit with s.alive = Finset.univ
(AC3).
Global-phase FSA and survivor-polling step toward [Ske81], pp. 140–141, not the cited
message-passing Central Site Termination Protocol result (#7289): from any reachable configuration
s with s.coord ∉ s.alive and b ∈ s.alive, electing b via backupPhase and sweeping
s.alive reaches threePCTerminate b s along a crash-free threePCLts trace, deciding
unanimously across s.alive while preserving UniformAgreement and AbortValidity.
Global-phase FSA and survivor-polling step toward [Ske81], §§4–5 (pp. 138–141), not the
cited message-passing 3PC result (#7289): from every reachable configuration s of threePCLts
(after arbitrary recursive primary and backup coordinator crashes) with s.alive.Nonempty, there
is a crash-free threePCLts execution among s.alive reaching unanimous survivor termination
satisfying UniformAgreement and AbortValidity.
Part II: Partition-cut impossibility step over CommitProtocol #
Global configuration of an asynchronous message-passing commit protocol.
- localState : P → S
Local state of each site.
- msgs : Multiset (CommitEnvelope P M)
Multiset of in-flight network envelopes.
General asynchronous point-to-point atomic commit protocol over process set P, local state
type S, and message payload type M ([SS83], §§III and V, pp. 220–225).
The specification permits arbitrary (possibly infinite) state and message spaces, nondeterministic
local transitions, and partition-timeout transitions informed of the reachable group G.
- init : P → Vote → S
Initial local state of site
pgiven its own initial votev. Irreversible decision readout of site
pin local states.No site has decided in its initial state.
Normal single-site step relation
NormalStep p s recv s' out: sitepin statesprocessesrecv(nonefor a spontaneous step orsome efor an incoming message) and moves tos'while emitting outgoing messagesout.Partition-timeout step relation
TimeoutStep p G s s' out: when isolated inside groupG, sitep ∈ Gmay take a timeout transition tos'and emit intra-group messagesout.- normal_decision_stable {p : P} {s : S} {recv : Option (CommitEnvelope P M)} {s' : S} {out : Multiset (CommitEnvelope P M)} {d : Decision} : self.NormalStep p s recv s' out → self.decision p s = some d → self.decision p s' = some d
Decisions are write-once along normal transitions.
- timeout_decision_stable {p : P} {G : Finset P} {s s' : S} {out : Multiset (CommitEnvelope P M)} {d : Decision} : self.TimeoutStep p G s s' out → self.decision p s = some d → self.decision p s' = some d
Decisions are write-once along timeout transitions.
Filter a message multiset to envelopes internal to a site group G (src ∈ G ∧ dest ∈ G).
Erase cross-partition messages upon a partition into (G₁, G₂), keeping intra-G₁ and
intra-G₂ messages while leaving all local states unchanged ([SS83], §V-A,
p. 225).
Cross-partition message erasure is symmetric in (G₁, G₂).
Global state of a CommitProtocol before (partitioned = false) and after
(partitioned = true) a two-group network partition.
- partitioned : Bool
Whether the network partition has occurred.
- cfg : CommitConfig P S M
Underlying local states and in-flight message buffer.
Transition labels of the partitioned CommitProtocol LTS.
- normal {P : Type u_1} {M : Type u_2} (p : P) (recv : Option (CommitEnvelope P M)) : PartitionAction P M
Pre-partition single-site step by
p. - cutPartition {P : Type u_1} {M : Type u_2} : PartitionAction P M
Occurrence of the network partition
(G₁, G₂)with loss of cross-group messages. - groupStep {P : Type u_1} {M : Type u_2} (side : Bool) (p : P) (recv : Option (CommitEnvelope P M)) : PartitionAction P M
Post-partition intra-group step within
G₁(side = false) orG₂(side = true).
Instances For
Decision vector of a CommitConfig.
Initial pre-partition configuration on vote profile votes.
Initial PartitionState on vote profile votes.
Single pre-partition step executed by site p on CommitConfig.
Single isolated step executed by site p ∈ G during a partition isolating G: either an
intra-G normal transition or a TimeoutStep p G transition.
Reflexive-transitive closure of pre-partition ConfigNormalStep transitions.
- refl {P : Type u_1} {S : Type u_2} {M : Type u_3} [DecidableEq P] [DecidableEq M] {π : CommitProtocol P S M} (cfg : CommitConfig P S M) : π.NormalSteps cfg cfg
- tail {P : Type u_1} {S : Type u_2} {M : Type u_3} [DecidableEq P] [DecidableEq M] {π : CommitProtocol P S M} {cfg₁ cfg₂ cfg₃ : CommitConfig P S M} {p : P} {recv : Option (CommitEnvelope P M)} : π.NormalSteps cfg₁ cfg₂ → π.ConfigNormalStep p recv cfg₂ cfg₃ → π.NormalSteps cfg₁ cfg₃
Reflexive-transitive closure of isolated post-partition GroupStepOn G transitions.
- refl {P : Type u_1} {S : Type u_2} {M : Type u_3} [DecidableEq P] [DecidableEq M] {π : CommitProtocol P S M} {G : Finset P} (cfg : CommitConfig P S M) : π.GroupSteps G cfg cfg
- stepL {P : Type u_1} {S : Type u_2} {M : Type u_3} [DecidableEq P] [DecidableEq M] {π : CommitProtocol P S M} {G : Finset P} {cfg₁ cfg₂ cfg₃ : CommitConfig P S M} {p : P} {recv : Option (CommitEnvelope P M)} : π.GroupStepOn G p recv cfg₁ cfg₂ → π.GroupSteps G cfg₂ cfg₃ → π.GroupSteps G cfg₁ cfg₃
Operational Cslib.LTS of π subject to a two-group network partition (G₁, G₂).
Partition-cut resilience predicate for CommitProtocol under cross-group message erasure
cutCfg (step after [SS83], §V-A, pp. 224–225, without crash-recovery states or a
3PC instantiation; #7289): protocol π satisfies partition-cut resilience on (G₁, G₂) if:
- (
AC1) every reachable state ofπ.lts G₁ G₂satisfiesUniformAgreement, - (
AC2) every reachable state ofπ.lts G₁ G₂satisfiesAbortValidity, - (
AC3) on all-.yesvotes, a partition-free execution reachesAllDecided _ .commit, - (isolated termination) from every partition-free reachable state
cfg, aftercutCfg G₁ G₂ cfgerases cross-group messages, bothG₁andG₂can independently reach decisions on all of their respective sites via isolatedGroupSteps.
- agreement (votes : P → Vote) (s : PartitionState P S M) : (π.lts G₁ G₂).CanReach (π.start votes) s → UniformAgreement (π.configDecision s.cfg)
AC1Uniform Agreement across all reachable pre- and post-partition states. - abortValidity (votes : P → Vote) (s : PartitionState P S M) : (π.lts G₁ G₂).CanReach (π.start votes) s → AbortValidity votes (π.configDecision s.cfg)
AC2Abort Validity across all reachable pre- and post-partition states. - failureFreeCommit : ∃ (cfg : CommitConfig P S M), π.NormalSteps (π.initConfig fun (x : P) => Vote.yes) cfg ∧ AllDecided (π.configDecision cfg) Decision.commit
AC3Commit Nontriviality on partition-free all-.yesruns. - nonblockingPartition (votes : P → Vote) (cfg : CommitConfig P S M) : π.NormalSteps (π.initConfig votes) cfg → (∃ (cfg₁ : CommitConfig P S M), π.GroupSteps G₁ (cutCfg G₁ G₂ cfg) cfg₁ ∧ ∀ p ∈ G₁, (π.decision p (cfg₁.localState p)).isSome = true) ∧ ∃ (cfg₂ : CommitConfig P S M), π.GroupSteps G₂ (cutCfg G₁ G₂ cfg) cfg₂ ∧ ∀ q ∈ G₂, (π.decision q (cfg₂.localState q)).isSome = true
Non-blocking independent termination of each isolated group
G₁andG₂.
Indistinguishability, commutation, and discrete-continuity crossing proof #
IsPartitionCutResilient is symmetric in the two isolated groups (G₁, G₂).
Partition-cut step after [SS83], §V-A, Theorem 4 (p. 225) and Appendix Proof
of Theorem 4 (p. 227), not the cited crash-recovery endpoint (#7289): for any nonempty disjoint
groups (G₁, G₂), no CommitProtocol (with cross-group message erasure cutCfg and without
crash-recovery states) satisfies CommitProtocol.IsPartitionCutResilient G₁ G₂.
Partition-cut step after [SS83], §V-A, Theorem 4 (p. 225), not the cited
crash-recovery endpoint (#7289): on any process set with 2 ≤ Fintype.card P, there exists a
simple two-way partition (G₁, G₂) (G₁.Nonempty, G₂.Nonempty, Disjoint G₁ G₂,
G₁ ∪ G₂ = Finset.univ), so no CommitProtocol satisfies CommitProtocol.IsPartitionCutResilient
across all simple two-way partitions.