Distributed database system utilizing an extended two-phase-commit process
First Claim
1. A method for implementation in a distributed database system comprising a cluster of databases, the method comprising:
- sending, by a commit coordinator in a voting phase, a query to commit message to a plurality of cohorts, each cohort being a database instance participating in the cluster of databases, at least one cohort being a cohort mirror redundantly storing data for a corresponding cohort, the query requesting the cohort to execute a transaction up to a commitment point;
receiving, by the commit coordinator, replies from the plurality of cohorts indicating whether execution of the transaction to the commitment point was successful or if execution of the transaction to the commitment point failed, wherein a reply to the query to commit message sent by the cohort mirror directly to the commit coordinator indicating that execution of the transaction to the commitment point was successful is treated as a reply indicating same by the corresponding cohort;
sending, by the commit coordinator in a completion phase, a commit message to all of the cohorts if all of the cohorts reply and all of the replies indicate that the execution of the transaction to the commitment point was successful, the commit message causing each cohort to complete the transaction and release any locks and resources held during execution of the transaction;
orsending, by the commit coordinator in the completion phase, a rollback message to all of the cohorts if one or more of the replies indicate that the execution of the transaction to the commitment point failed, the rollback message causing each cohort to undo the transaction and release any locks and resources held during execution of the transaction;
initiating, by the commit coordinator, a restart process upon a failure of the commit coordinator; and
queuing, by the commit coordinator, without starting processing the incoming transactions until a restarted cohort executing a current transaction sends a message indicating completion of the current transaction.
2 Assignments
0 Petitions
Accused Products
Abstract
A distributed database system is provided in which a commit coordinator ensures that transactions spanning multiple database instances are committed or rolled back consistently. The commit coordinator utilizes an extended two-phase-commit process. The extension of the two-phase-commit process enables, that if within the distributed database cohorts store redundant data for a productive operation, only one of the cohorts out of a redundancy group are required. By this, the distributed database is prepared to continue operation even during shutdown or failure of single cohorts. Related apparatus, systems, techniques and articles are also described.
-
Citations
19 Claims
-
1. A method for implementation in a distributed database system comprising a cluster of databases, the method comprising:
-
sending, by a commit coordinator in a voting phase, a query to commit message to a plurality of cohorts, each cohort being a database instance participating in the cluster of databases, at least one cohort being a cohort mirror redundantly storing data for a corresponding cohort, the query requesting the cohort to execute a transaction up to a commitment point; receiving, by the commit coordinator, replies from the plurality of cohorts indicating whether execution of the transaction to the commitment point was successful or if execution of the transaction to the commitment point failed, wherein a reply to the query to commit message sent by the cohort mirror directly to the commit coordinator indicating that execution of the transaction to the commitment point was successful is treated as a reply indicating same by the corresponding cohort; sending, by the commit coordinator in a completion phase, a commit message to all of the cohorts if all of the cohorts reply and all of the replies indicate that the execution of the transaction to the commitment point was successful, the commit message causing each cohort to complete the transaction and release any locks and resources held during execution of the transaction;
orsending, by the commit coordinator in the completion phase, a rollback message to all of the cohorts if one or more of the replies indicate that the execution of the transaction to the commitment point failed, the rollback message causing each cohort to undo the transaction and release any locks and resources held during execution of the transaction; initiating, by the commit coordinator, a restart process upon a failure of the commit coordinator; and queuing, by the commit coordinator, without starting processing the incoming transactions until a restarted cohort executing a current transaction sends a message indicating completion of the current transaction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A method for implementation in a distributed database system comprising a cluster of databases, the method comprising:
-
sending a query to commit message to a plurality of cohorts and to cohort mirrors redundantly storing data for a corresponding cohort, each cohort and each cohort mirror being a database instance participating in the cluster of databases, the query requesting execution of a transaction up to a commitment point; receiving replies from at least a portion of the plurality of cohorts and/or cohort mirrors indicating whether execution of the transaction to the commitment point was successful or if execution of the transaction to the commitment point failed, wherein a reply to the query to commit message sent by the cohort mirror directly to the commit coordinator indicating that execution of the transaction to the commitment point was successful is treated as a reply indicating same by the corresponding cohort; and sending a commit message to all of the cohorts and each cohort mirror if the replies indicate that the execution of the transaction to the commitment point was successful, the commit message causing each cohort and each cohort mirror to complete the transaction and release any locks and resources held during execution of the transaction;
orsending a rollback message to all of the cohorts and each cohort mirror if one or more of the replies indicate that the execution of the transaction to the commitment point failed or if a reply was not received, the rollback message causing each cohort and each cohort mirror to undo the transaction and release any locks and resources held during execution of the transaction.
-
-
19. A system comprising:
-
a database system having a plurality of servers running two or more redundant database instances, each server comprising memory and at least one programmable data processor; a plurality of application servers coupled to the database system to periodically access data stored within the database system, each application server comprising memory and at least one programmable data processor; a commit coordinator computing system coupled to the database system and the plurality of application servers, the commit coordinator computing system comprising memory and at least one programmable data processor; wherein the commit coordinator computing system; sends a query to commit message to a plurality of cohorts and to cohort mirrors redundantly storing data for a corresponding cohort, each cohort and each cohort mirror being a database instance, the query requesting execution of a transaction up to a commitment point; receives replies from at least a portion of the plurality of cohorts and/or cohort mirrors indicating whether execution of the transaction to the commitment point was successful or if execution of the transaction to the commitment point failed; and sends a commit message to all of the cohorts and each cohort mirror if the replies indicate that the execution of the transaction to the commitment point was successful, the commit message causing each cohort and each cohort mirror to complete the transaction and release any locks and resources held during execution of the transaction;
orsends a rollback message to all of the cohorts and each cohort mirror if one or more of the replies indicate that the execution of the transaction to the commitment point failed or if a reply was not received, the rollback message causing each cohort and each cohort mirror to undo the transaction and release any locks and resources held during execution of the transaction; wherein; if one of the cohorts has been set down during the commit process, no further query to commit messages are sent to the cohort by the commit coordinator, and a fail-over procedure is subsequently initiated to restart and phase-in such cohort, the fail-over procedure comprising a restart and roll-forward phase followed by a registration phase followed by a phase-in phase; a reply to the query to commit message that is sent by the cohort mirror directly to the commit coordinator and which indicates that execution of the transaction to the commitment point was successful is treated as a reply indicating same by the corresponding cohort.
-
Specification