Two-Phase Commit
8.1 Introduction
The previous chapter showed how to use logging to ensure that a transaction is atomic with respect to failures, provided that the transaction updates data only in one resource manager. If two or more resource managers process updates for a transaction, then another technique is needed to ensure that the transaction commits at all resource managers or at none of them. This is called the two-phase commit protocol. Chapter 1 briefly introduced the protocol. This chapter develops it in more detail.
The main goal of the protocol is to ensure that a transaction either commits at all the resource managers that it accessed or aborts at all of them. The undesirable outcome that the protocol avoids is that the ...
Get Principles of Transaction Processing, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.