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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access