Two-phase commit protocol

Two-phase commit protocol

Jesse Russell Ronald Cohn

     

бумажная книга



ISBN: 978-5-5142-6720-0

High Quality Content by WIKIPEDIA articles! In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction (it is a specialized type of consensus protocol). The protocol achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely utilized. However, it is not resilient to all possible failure configurations, and in rare cases user (e.g., a system`s administrator) intervention is needed to remedy an outcome. To accommodate recovery from failure (automatic in most cases) the protocol`s participants use logging of the protocol`s states. Log records, which are typically slow to generate but survive failures, are used by the protocol`s recovery procedures. Many protocol variants exist that primarily differ in logging strategies and recovery mechanisms. Though usually intended to be used infrequently, recovery procedures comprise a substantial portion of the protocol, due to many possible failure scenarios to be considered and supported by the protocol.