Robust end-of-log processing
First Claim
Patent Images
1. A method for processing database transaction log files, the method comprising:
- invalidating a discard log file of a transaction log of a first database, wherein the discard log file is an unusable transaction log file comprising one or more log blocks of the transaction log having unusable data content that is to be discarded before the first database can begin processing new log records of database transactions received from a second database,wherein invalidating the discard log file comprises;
(a) reading discard log information from a storage area, the discard log information comprising an indicator that the discard log file exists, a starting point identifier of the discard log file, and an ending point identifier of the discard log file, the discard log file comprising at least one log block of the transaction log having unusable data content that is to be discarded;
(b) replacing the unusable data content of the at least one log block of the discard log file with an identifiably invalid data pattern that makes the log block content of the discard log file identifiable as invalid when scanning the transaction log, said identifiably invalid data pattern comprising a pattern of all zeros, a pattern of all ones or a pattern having a fixed combination of zeros and ones; and
invalidating header information of the at least one log block; and
(c) resetting the discard log information, the reset clearing the indicator that the discard log file exists; and
overlaying identifiably invalid content of a discarded log block of the discard log file with new log records received from the second database, andusing existing identifiably invalid content of the discard log file to detect an end of the transaction log, when scanning the transaction log during a recovery process from failure.
2 Assignments
0 Petitions
Accused Products
Abstract
A method of invalidating an unused log file in a database includes examining a discard log information storage area and determining if a discard log exists. If the discard log exists, the log is invalidated. The headers of each of the log files that have been fully invalidated are then invalidated. The discard log is then fully invalidated and a new log file may be generated on top of the discarded log. The method may be interrupted by a failure, a changeover, or crash and will be repeated until it completes.
-
Citations
19 Claims
-
1. A method for processing database transaction log files, the method comprising:
-
invalidating a discard log file of a transaction log of a first database, wherein the discard log file is an unusable transaction log file comprising one or more log blocks of the transaction log having unusable data content that is to be discarded before the first database can begin processing new log records of database transactions received from a second database, wherein invalidating the discard log file comprises; (a) reading discard log information from a storage area, the discard log information comprising an indicator that the discard log file exists, a starting point identifier of the discard log file, and an ending point identifier of the discard log file, the discard log file comprising at least one log block of the transaction log having unusable data content that is to be discarded; (b) replacing the unusable data content of the at least one log block of the discard log file with an identifiably invalid data pattern that makes the log block content of the discard log file identifiable as invalid when scanning the transaction log, said identifiably invalid data pattern comprising a pattern of all zeros, a pattern of all ones or a pattern having a fixed combination of zeros and ones; and
invalidating header information of the at least one log block; and(c) resetting the discard log information, the reset clearing the indicator that the discard log file exists; and overlaying identifiably invalid content of a discarded log block of the discard log file with new log records received from the second database, and using existing identifiably invalid content of the discard log file to detect an end of the transaction log, when scanning the transaction log during a recovery process from failure. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for processing database transaction log files, the method comprising:
-
invalidating a discard log file of a transaction log of a first database, wherein the discard log file is an unusable transaction log file comprising one or more log blocks of the transaction log having unusable data content that is to be discarded before the first database can begin processing new log records of database transactions received from a second database, wherein invalidating the discard log file comprises; (a) reading discard log information from a storage area, the discard log information comprising an indicator that the discard log file exists, a starting point identifier of the discard log file, and an ending point identifier of the discard log file, the discard log file comprising at least a first log block of the transaction log having unusable data content that is to be discarded; (b) replacing the unusable data content of the first log block of the transaction log that is to be discarded with an identifiably invalid data pattern that makes the log block content of the discard log file identifiable as invalid when scanning the transaction log, said identifiably invalid data pattern comprising a pattern of all zeros, a pattern of all ones or a pattern having a fixed combination of zeros and ones; and
invalidating header information of the at least one log block;(c) updating the starting point identifier of the discard log file to correspond to a next sequential log block having unusable data content following the first log block; asynchronously invalidating a remaining portion of the discard log file starting with the next sequential log block while the first database is receiving and processing new log records from the second database; using existing identifiably invalid content of the discard log file to detect an end of the transaction log, when scanning the transaction log during a recovery process from failure. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer-readable storage medium having computer-executable instructions to perform a method for processing database transaction log files, the method comprising:
-
invalidating a discard log file of a transaction log of a first database, wherein the discard log file is an unusable transaction log file comprising one or more log blocks at the end of the transaction log having unusable data content that is to be discarded before the first database can begin processing new log records of database transactions received from a second database, wherein invalidating the discard log file comprises; (a) reading discard log information from a storage area, the discard log information comprising an indicator that the discard log file exists, a starting point identifier of the discard log file, and an ending point identifier of the discard log file, the discard log file comprising at least one log block of the transaction log having unusable data content that is to be discarded; (b) replacing the unusable data content of the at least one log block of the discard log file with an identifiably invalid data pattern that makes the log block content of the discard log file identifiable as invalid when scanning the transaction log, said identifiably invalid data pattern comprising a pattern of all zeros, a pattern of all ones or a pattern having a fixed combination of zeros and ones; and
invalidating header information of the at least one log block; and(c) writing a pattern of identifiably invalid data into header information of the at least one log block; and (d) resetting the discard log information, the reset clearing the indicator that the discard log file exists; and overlaying identifiably invalid content of a discarded log block of the discard log file with new log records received from the second database, and using existing identifiably invalid content of the discard log file to detect an end of the transaction log, when scanning the transaction log during a recovery process from failure. - View Dependent Claims (16, 17, 18, 19)
-
Specification