Method and apparatus for logging journal data using a log write ahead data set
First Claim
1. In a system in which data base references are first recorded in a buffer and upon said buffer being filled, transferring its contents to a first log of references and bounding synchronization points of the first (begin transaction) or second types (commit or rollback transaction) stored together with the data base in a nonvolatile memory, a method for data base recovery in the event of system failure, comprising the steps of:
- (a) formatting a second log in the memory;
(b) writing data base references into the buffer;
(c) monitoring buffer capacity and the occurrence of synchronization points;
(d) transferring any accumulated buffer contents to the second log when a synchronization point occurs prior to the buffer being filled; and
(e) in the event the data base references in the buffer are lost during system failure, redoing or undoing any changes to the data base utilizing the second log, otherwise redoing or undoing any changes utilizing the first log.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention provides a computing apparatus and method for maintaining a journal log. The computing apparatus includes volatile storage for storing a log buffer and a non-volatile storage for storing a journal log. Non-volatile storage means are provided for storing in a write-ahead data set a plurality of short data blocks. The log buffer contents are written to the write-ahead data set responsive to a process epoch occurring before the log buffer is filled. The log buffer contents are written to the journal log upon the log buffer being filled. The redoing or undoing of data base changes is made with reference to the write ahead data set only in the case of a system failure resulting in loss of log buffer data not yet written to the journal log; otherwise data base changes are redone or undone with reference to the log buffer or journal log.
215 Citations
5 Claims
-
1. In a system in which data base references are first recorded in a buffer and upon said buffer being filled, transferring its contents to a first log of references and bounding synchronization points of the first (begin transaction) or second types (commit or rollback transaction) stored together with the data base in a nonvolatile memory, a method for data base recovery in the event of system failure, comprising the steps of:
-
(a) formatting a second log in the memory; (b) writing data base references into the buffer; (c) monitoring buffer capacity and the occurrence of synchronization points; (d) transferring any accumulated buffer contents to the second log when a synchronization point occurs prior to the buffer being filled; and (e) in the event the data base references in the buffer are lost during system failure, redoing or undoing any changes to the data base utilizing the second log, otherwise redoing or undoing any changes utilizing the first log. - View Dependent Claims (2, 3, 4)
-
-
5. In a system in which transactions denominating a sequence of data base references bounded by synchronization points of a first (begin transaction) and a second (commit or rollback transaction) type are either completed or aborted, the data base references being first recorded in a buffer and upon said buffer being filled transferring said references to a first log stored together with the data base in a nonvolatile memory, a method for ensuring the redoing and undoing of any changes to the data base in the event a system failure occurs, comprising the steps of:
-
(a) formatting a second log in the memory; (b) writing data base references into the buffer; (c) monitoring the capacity of the buffer and the occurrence of synchronization points; (d) transferring any accumulated buffer references to the second log strobed only by the occurrence of synchronization points; and (e) given the unavailability of the buffer contents, redoing those transactions having synchronization points of the second type occurring in the interval between a known prior information state of the data base and the system failure and undoing those transactions having synchronization points of the first type but not of the second type occurring in said interval.
-
Specification