摘要:
A method and system for recovering after a crash of an instance in a database is disclosed. According to the method, a plurality of dead transactions associated with the crashed instance are identified. Statistical data is compiled from the identified plurality of dead transactions. Based on the statistical data, it is determined that a particular number of recovery servers should be used to recover the plurality of dead transactions. The plurality of dead transactions are then recovered using the particular number of recovery servers. The particular number of recovery servers can execute in parallel to recover the plurality of dead transactions.
摘要:
Described is an approach for recovering the failure of a transaction. According to the approach, a first change and a third change is made to a first resource and a second change is made to a second resource. The second change was made after the first but before the third. However, to recover the failure of the transaction, a recovery record for the third change is applied before the recovery record for the second change. Also described is an approach involving establishing links that link together a set of undo records that contain changes made to the particular resource. Also described is an approach for applying two or more undo records in parallel.
摘要:
A mechanism for performing a two-phase commit is provided. The mechanisms perform a two-phase commit in a manner that reduces the number of messages transmitted between a coordinating database system and the participating database systems, and the number of log flushes performed to complete a two-phase commit. To determine whether a particular participating database system is prepared to commit, the coordinating database system first examines external log tracking data that resides on the coordinating database system. External log tracking data, which indicates various states of logs on other database systems, is used to determine whether or not a particular participating database system is prepared to commit.
摘要:
A system and method for selectively viewing temporal row data in a consistent read-implemented database are described. Committed transactions effecting row data changes to a database are tracked and a stored system change number is assigned upon each committed transaction. Rollback segments for uncommitted transactions are stored. Each rollback segment stores a transaction identifier and transaction table entries containing ordered row data values reflecting the database changes. The database is transitioned into successive consistent versions responsive to each committed transaction at a journaled commit time. The transaction table entries are maintained for a user-definable retention period following the commit time of each committed transaction. A queried selection of row data values from the database is performed as of a query time occurring prior to the commit time of at least one committed transaction. The ordered row data values contained in the rollback segments storing a transaction identifier for the at least one committed transaction are retrieved.
摘要:
A mechanism for performing a two-phase commit is provided. The mechanisms perform a two-phase commit in a manner that reduces the number of messages transmitted between a coordinating database system and the participating database systems, and the number of log flushes performed to complete a two-phase commit. To determine whether a particular participating database system is prepared to commit, the coordinating database system first examines external log tracking data that resides on the coordinating database system. External log tracking data, which indicates various states of logs on other database systems, is used to determine whether or not a particular participating database system is prepared to commit.
摘要:
A method and apparatus for performing a two-phase commit of a transaction is provided. The mechanisms described herein perform a two-phase commit in a manner that reduces the number of messages transmitted between a coordinating database system and the participating database systems, and the number of log flushes performed to complete a two-phase commit. Once the coordinating database system determines that all participating database systems participating in a database transaction are prepared to commit, the coordinating database system commits the transaction on the coordinating database system. Forget requests are then transmitted to each of the participating database systems. Rather than waiting to receive a forget acknowledgment and performing other forget processing operations, the coordinating database system delegates this work to a forget collector. A commit acknowledgement may be sent to a user by the coordinating database system prior to receiving the forgot acknowledgements, and the user may proceed as if the whole transaction is committed on all database systems. When a participating database system receives a forget request for a transaction, the participating database system commits the transaction by generating a commit record in its log. Rather than flushing the log to make the commit persistent, and performing other forget processing operations, the participating database system hands off this work to a forget collector.
摘要:
A method and an apparatus for determining whether a transaction can use a version of a data item is provided. Transaction summary data is generated that is associated with one or more transactions that have updated a version of the data item. The transaction summary data specifies both a data buffer refresh time and a data buffer commit time. The data buffer refresh time is indicative of the latest time at which the version of data is guaranteed to be current. The data buffer commit time is indicative of the commit time of a most recently committed transaction from the one or more transactions that committed after updating the version of the data item. A determination is made, based upon the transaction summary data and a snapshot time used by the first transaction, whether the version of the data item is to be provided to the first transaction. The data buffer commit time is updated to reflect the commit time of other transactions that commit after updating the version of the data item.
摘要:
A method and apparatus for removing changes made by a particular transaction is provided. According to one aspect, two or more sets of changes that were made by a particular transaction that can be removed in parallel are identified. A corresponding recovery process is assigned to each of the two or more sets of changes. Using the corresponding recovery process, the changes identified in each of the two or more sets of changes are undone in parallel.
摘要:
A mechanism is described for constructing work granules, where the work granules are constructed independently of whether two or more of the work granules are assigned to operate on a logical storage unit that contains a portion of the same row. A database system maintains transaction control data for data blocks in a manner that avoids self-deadlocks for slaves that follow a row collision protocol. A row collision protocol is a set of rules or steps that slaves follow to ensure that only one subtransaction in a distributed transaction updates a spanning row. Thus, for a particular spanning row, a single subtransaction modifies all the row pieces of the spanning row in any data block containing any row pieces of the spanning row. Consequently, a given data block may be affected by multiple subtransactions in a distributed transaction, one subtransaction affecting a row piece in the data block, another subtransaction affecting other rows in the data block.
摘要:
A method and apparatus for removing changes made by a dead transaction is provided. According to the method, a first change is performed by the dead transaction prior to a second change. The first change made by the dead transaction is then undone prior to undoing the second change made by the dead transaction. According to another aspect of the invention, a method and apparatus for applying changes in redo records to make a particular resource reflect changes made to the particular resource in volatile memory before a failure is provided. The method includes establishing links that link together a set of redo records that contain changes made to the particular resource. The links are then followed to apply the changes contained in the set of redo records to cause the particular resource to reflect the changes made to the particular resource in volatile memory before the failure. According to another aspect of the invention, a method and apparatus for applying changes in two or more redo records in parallel is provided. According to the method, a plurality of resources are locked by a dead transaction. A plurality of sets of redo records are established that do not contain any redo records that depend on any redo records in any other set of redo records. The plurality of sets of redo records are applied in parallel relative to one another.