Two-pass multi-version read consistency
First Claim
1. A method for executing a distributed transaction in a distributed database having at least first and second databases comprising the steps of:
- generating a first system commit number associated with a first data block to be modified at said first database;
generating a second system commit number associated with a second data block to be modified at said second database;
comparing said first system commit number with said second system commit number;
defining said first system commit number as a transaction system commit number if said first system commit number has a value greater than said second system commit number;
defining said second system commit number as a transaction system commit number if said second system commit number has a value greater than said first system commit number;
providing said transaction system commit number to said first database and said second database associated with said first block of data and said second block of data.
4 Assignments
0 Petitions
Accused Products
Abstract
The present invention describes a method and apparatus that forces all parts of an update transaction to commit automatically using a two-phase commit. The present invention uses the two-phase commit messages to negotiate a system commit number (SCN) that is then recorded on each of the nodes as the logical point in time that the distributed transaction committed. The two-phase commit scheme of the present invention consists of a "prepare" phase and a "commit" phase. The transaction in the distributed database environment involves multiple participants (databases). In the prepare phase, one of the N database participants is selected as the "commit point." The commit point includes the log into which the information is written that states the transaction has committed. The remaining N-1 participants enter a "prepare phase." In the prepare phase, the prepare participants lock their databases and enter a state in which they are ready to roll back or commit to the transaction. The mid-point of the two-phase commit is the point at which the commit point database (nth participant) writes the commit transaction to its log. In the second phase, the remaining participants are informed to commit the transaction and release locks that have been set.
-
Citations
20 Claims
-
1. A method for executing a distributed transaction in a distributed database having at least first and second databases comprising the steps of:
-
generating a first system commit number associated with a first data block to be modified at said first database; generating a second system commit number associated with a second data block to be modified at said second database; comparing said first system commit number with said second system commit number; defining said first system commit number as a transaction system commit number if said first system commit number has a value greater than said second system commit number; defining said second system commit number as a transaction system commit number if said second system commit number has a value greater than said first system commit number; providing said transaction system commit number to said first database and said second database associated with said first block of data and said second block of data. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. An apparatus for executing a distributed transaction in a distributed database having at least first and second databases comprising:
-
first system commit number generating means, said first system commit number generating means generating a first system commit number associated with a first data block to be modified at said first database; second system commit number generating means, said second system commit number generating means generating a second system commit number associated with a second data block to be modified at said second database; comparing means coupled to said first system commit number generating means and said second system commit number generating means, said comparing means comparing said first system commit number with said second system commit number; controlling means coupled to said comparing means, said controlling means selecting a value for a transaction system commit number equal to the value of said first system commit number if said first system commit number has a value greater than said second system commit number; said controlling means selecting a value for said transaction system commit number equal to the value of said second system commit number if said second system commit number has a value greater than said first system commit number; transmission means coupled to said controlling means, said transmission means providing said transaction system commit number to said first database and said second database associated with said first block of data and said second block of data. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification