O'Reilly logo

Principles of Transaction Processing, 2nd Edition by Eric Newcomer, Philip A. Bernstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required