Home
Dictionary
Tags
Technology Trends
Two-Phase Commit
Definition - What does
Two-Phase Commit
mean?
A two-phase commit is a standardized protocol that ensures a commit is implementing when the commit operation must be broken into two separate parts. In database management, saving data changes is known as a commit and undoing changes is known as a rollback. Both can be achieved easily using transaction logging when a single server is involved, but when the data is spread across geographically-diverse servers in distributed computing (i.e., each server being an independent entity with separate log records), the process can become more tricky.
Techopedia explains
Two-Phase Commit
A special object, known as a coordinator, is required in a distributed transaction. As its name implies, the coordinator arranges activities and synchronization between distributed servers. The two-phase commit is implemented as follows:
Phase 1: Each server that needs to commit data writes its data records to the log. If a server is unsuccessful, it responds with an Oops message, which indicates failure. If successful, the server replies with an OK message. Phase 2:This phase begins after all participants respond OK. Then, the coordinator sends a signal to each server with commit instructions. After committing, each writes the commit as part of its log record for reference and sends the coordinator a message that its commit has been successfully implemented. If a server fails, the coordinator sends instructions to all servers to roll back the transaction. After the servers roll back, each sends feedback that this has been completed.
Posted by:
Cory Janssen
Tweet
Tweet
Related Terms
Rollback
Object-Oriented Programming (OOP)
Commit
Database (DB)
Related Videos
Related Links
Related White Papers
Other Resources
Related Tags
Categories:
Databases
Data Management
Object Oriented Programming (OOP)
Technology Trends
Recommended For You
close
Fast News Nation: Why Social Media Almost Works As a News Source
Read More
ยป
Connect with us
Techopedia on Linkedin
Follow us on LinkedIn
Techopedia on Twitter
'@Techopedia'
Sign up for Techopedia's Free Newsletter!
Sign-In
Join Techopedia
Home
Dictionary
Articles
Tutorials
Newsletters
Menu
Home
Dictionary
Articles
Tech 101
How To
5 Things
IT Careers
History of Tech
Tutorials
Hot Trends
Big Data
Windows 8
Security
Cloud Computing
Data Centers
Mobile Computing
CRM
Green IT
Storage
Virtualization
Online Privacy
Job Roles
Developers
Network Admins
Database Admins
Tech Support
IT Management
Water Cooler
Infographics
Who To Follow
All Topics
Hacking
Online Marketing
Buzzwords and Jargon
Viruses
Operating Systems
Legal
People
Search Engines
World Wide Web
Personal Tech
Gaming
Linux
Internet