Claims
- 1. A method for reducing the recovery time after a failure, comprising the steps of:
maintaining a checkpoint value that indicates which records of a plurality of records have to be processed after the failure, wherein the plurality of records indicate changes for a plurality of data blocks; determining a target checkpoint value based on a desired number of data block reads that will be required during a redo phase of recovery; and updating the checkpoint value based on the target checkpoint value.
- 2. The method of claim 1, further comprising the step of:
maintaining, in volatile memory, one or more sorted buffer queues, wherein each sorted buffer queue includes queue entries that are inserted into said sorted buffer queue based on an index value associated with said queue entry, wherein each queue entry reflects a change to a data block of the plurality of data blocks.
- 3. The method of claim 2, wherein the one or more sorted buffer queues are one or more circular sorted buffer queues, and wherein a modulus operation is used identity the index value associated with each circular sorted buffer queue when inserting a queue entry into the circular sorted buffer queue.
- 4. The method of claim 2, further comprising:
maintaining a count of the queue entries in each of the one or more sorted buffer queues.
- 5. The method of claim 2, wherein each of the one or more sorted buffer queues is associated with a target number of queue entries, and the method further comprises:
determining a count of the queue entries in each of the one or more sorted buffer queues; and if the count of the queue entries in a particular sorted buffer queue of the one or more sorted buffer queues is greater than target number of queue entries associated with the particular sorted buffer queue, then reducing the number of queue entries in the particular sorted buffer queue to the target number of queue entries associated with the particular sorted buffer queue.
- 6. The method of claim 2, wherein the step of updating the checkpoint value comprises:
updating the checkpoint value to equal a byte offset in a redo log associated with the queue entry in the one or more sorted buffer queues that is associated with the least recently modified buffer in any queue entry in the one or more sorted buffer queues.
- 7. The method of claim 1, further comprising the step of:
maintaining, in volatile memory, one or more partially sorted buffer queues, wherein each partially sorted buffer queue includes queue entries that are inserted into said partially sorted buffer queue based on an index value associated with said queue entry, wherein each queue entry reflects a change to a data block of the plurality of data blocks.
- 8. The method of claim 1, wherein the checkpoint value is a first checkpoint value in a plurality of checkpoint values, and the method further comprises the step of:
maintaining the plurality of checkpoint values, wherein each of the plurality of checkpoint values indicates which records of the plurality of records have to be processed after the failure by a particular database server accessing a database, wherein the plurality of records indicate changes for the plurality of data blocks.
- 9. A method for controlling an amount of time that is needed to recover after the occurrence of a database system failure, the method comprising the steps of:
maintaining a checkpoint value that indicates which records of a plurality of records have to be processed after the failure, wherein the plurality of records indicate changes for a plurality of data blocks; determining a required recovery time, wherein the required recovery time indicates a maximum length of time that is to be allowed for recovering after said database system failure; determining a maximum number of data block reads that can be performed within the required recovery time; and periodically advancing the target checkpoint value based on the maximum number of data block reads that can be performed within the required recovery time.
- 10. A computer-readable medium carrying one or more sequences of instructions for reducing the recovery time after a failure, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
maintaining a checkpoint value that indicates which records of a plurality of records have to be processed after the failure, wherein the plurality of records indicate changes for a plurality of data blocks; determining a target checkpoint value based on a desired number of data block reads that will be required during a redo phase of recovery; and updating the checkpoint value based on the target checkpoint value.
- 11. The computer-readable medium of claim 10, wherein execution of the one or more sequences of instructions by the one or more processors causes the one or more processors to further perform the step of:
maintaining, in volatile memory, one or more sorted buffer queues, wherein each sorted buffer queue includes queue entries that are inserted into said sorted buffer queue based on an index value associated with said queue entry, wherein each queue entry reflects a change to a data block of the plurality of data blocks.
- 12. The computer-readable medium of claim 11, wherein the one or more sorted buffer queues are one or more circular sorted buffer queues, and wherein a modulus operation is used identity the index value associated with each circular sorted buffer queue when inserting a queue entry into the circular sorted buffer queue.
- 13. The computer-readable medium of claim 11, wherein execution of the one or more sequences of instructions by the one or more processors causes the one or more processors to further perform the steps of:
maintaining a count of the queue entries in each of the one or more sorted buffer queues.
- 14. The computer-readable medium of claim 11, wherein each of the one or more sorted buffer queues is associated with a target number of queue entries, and wherein execution of the one or more sequences of instructions by the one or more processors causes the one or more processors to further perform the steps of:
determining a count of the queue entries in each of the one or more sorted buffer queues; and if the count of the queue entries in a particular sorted buffer queue of the one or more sorted buffer queues is greater than target number of queue entries associated with the particular sorted buffer queue, then reducing the number of queue entries in the particular sorted buffer queue to the target number of queue entries associated with the particular sorted buffer queue.
- 15. The computer-readable medium of claim 11, wherein the step of updating the checkpoint value comprises:
updating the checkpoint value to equal a byte offset in a redo log associated with the queue entry in the one or more sorted buffer queues that is associated with the least recently modified buffer in any queue entry in the one or more sorted buffer queues.
- 16. The computer-readable medium of claim 10, wherein execution of the one or more sequences of instructions by the one or more processors causes the one or more processors to further perform the step of:
maintaining, in volatile memory, one or more partially sorted buffer queues, wherein each partially sorted buffer queue includes queue entries that are inserted into said partially sorted buffer queue based on an index value associated with said queue entry, wherein each queue entry reflects a change to a data block of the plurality of data blocks.
- 17. The computer-readable medium of claim 10, wherein the checkpoint value is a first checkpoint value in a plurality of checkpoint values, and wherein execution of the one or more sequences of instructions by the one or more processors causes the one or more processors to further perform the step of:
maintaining the plurality of checkpoint values, wherein each of the plurality of checkpoint values indicates which records of the plurality of records have to be processed after the failure by a particular database server accessing a database, wherein the plurality of records indicate changes for the plurality of data blocks.
- 18. A computer-readable medium carrying one or more sequences of instructions for controlling an amount of time that is needed to recover after the occurrence of a database system failure, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
maintaining a checkpoint value that indicates which records of a plurality of records have to be processed after the failure, wherein the plurality of records indicate changes for a plurality of data blocks; determining a required recovery time, wherein the required recovery time indicates a maximum length of time that is to be allowed for recovering after said database system failure; determining a maximum number of data block reads that can be performed within the required recovery time; and periodically advancing the target checkpoint value based on the maximum number of data block reads that can be performed within the required recovery time.
RELATED APPLICATION
[0001] This application is a continuation of U.S. patent application Ser. No. 09/843,388, filed on Apr. 25, 2001, entitled “Method and System for Controlling Recovery Downtime”, the contents of which is incorporated herein by reference in its entirety, which is a continuation of U.S. Pat. No. 6,351,754, filed on Jun. 23, 1998, entitled “Method and System for Controlling Recovery Downtime”, the contents of which is incorporated herein by reference in its entirety.
[0002] The present Application is also related to U.S. Pat. No. 6,253,212, entitled “Method and System for Maintaining Checkpoint Values” filed by Juan R. Loaiza, William H. Bridge, Jr. and Ashok Joshi on Jun. 23, 1998, the contents of which is incorporated herein by reference in its entirety.
Continuations (2)
|
Number |
Date |
Country |
Parent |
09843388 |
Apr 2001 |
US |
Child |
10750806 |
Jan 2004 |
US |
Parent |
09103630 |
Jun 1998 |
US |
Child |
09843388 |
Apr 2001 |
US |