摘要:
A method and apparatus for incremental undo is provided. A process, executing in a database system, establishes a rollback entry in an undo log file as a current rollback entry. The rollback entry, which was selected from a set of rollback entries contained in an undo record, contains data that indicates a change made by a transaction to a data block in the database system. The process first determines whether the rollback entry has been applied by testing a status flag. In one embodiment, the status flag is a bit in a bit vector in the undo block. If the rollback entry has been applied to the database, then the rollback entry is not re-applied; rather, a next rollback entry is established from the set of rollback entries and the process repeats. If the rollback entry has not been applied, then undo information from the rollback entry is retrieved from the undo block and change is generated. The status flag is set to indicate that the rollback entry has been applied and a next rollback entry corresponding to the data block is retrieved. The process repeats until there are no more rollback entries to be performed, then the multiple changes are applied to disk in a single atomic operation.
摘要:
A method and an apparatus for tracking of the dependencies between transactions is provided. Every time a data item is updated, a record is made of the transaction that updated the data item. Before another transaction locks a data item previously locked by the transaction, the entry is updated to indicate that the transaction committed and the commit time of the transaction. These entries are contained in a list head that is maintained on the same block as the data item, and a list tail that is stored separate from the data block that contains the data item. A depends-on time is maintained for each transaction. Whenever the transaction updates a data item, the depends-on time is set to the greater of the current depends-on time and the commit time of the most recently committed transaction that updated the version of the data item. Whether a transaction depends on a committed transaction is then determined based on a simple comparison between the depends-on time associated with the transaction and the commit time of the committed transaction.
摘要:
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 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 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 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.
摘要:
A database or some portion thereof is partitioned into ownership groups. Each ownership group is assigned one or more database servers as owners of the ownership group. The database servers that are assigned as owners of an ownership group are treated as the owners of all data items that belong to the ownership group. That is, they are allowed to directly access the data items within the ownership group, while other database servers are not allowed to directly access those data items. A mechanism is provided for transitioning ownership of a data item. Ownership is transferred by disabling access to the data item, waiting for all transactions that have made changes to the data item to either commit or abort, changing data that indicates ownership of the data item from a first owner to a second owner, and enabling access to the data item.
摘要:
An intelligent database infrastructure wherein the management of all database components is performed by and within the database itself by integrating management of various components with a central management control. Each individual database component, as well as the central management control, is self-managing. A central management control module integrates and interacts with the various database components. The database is configured to automatically tune to varying workloads and configurations, correct or alert about bad conditions, and advise on ways to improve overall system performance.
摘要:
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.