This is a feature in transaction processing systems that enables all databases to be synchronized or in the same state in case some error occurs.
This strategy works in the principal that either all databases are updated or none of them are updated.
DB changes required by the transactions are initially stored temporarily by each database, then a pre-commit command is issued to each databases. The transaction monitor waits for the acknowledgment of the pre-commit command, if received then commit command is sent to each database, that results to make the database change permanent.
In case, the acknowledgment is not received, the rollback command is issued to all the databases.