System and method for variable block logging with log-ahead buffers
AssigneeComputer Associates Think, Inc.
InventorJoseph B. LYNN
Life of this patent
Estimating the term…
Abstract
A system for logging database transactions comprises a memory (comprising a direct access storage device) operable to store a database, a database log, and a plurality of log buffers associated with the database log. Each log buffer is operable to store at least one log record associated with a database transaction. The system further comprises a processor operable to log a first record of a first database transaction using the database log and write the database log to the storage device. The processor is further operable to log a second record of a second database transaction in a first of the plurality of log buffers substantially concurrently to the database log being written to the storage device.
Claims26
A system for variable block logging with log-ahead buffers, wherein the system comprises one or more processors configured to:
- determine a number and a size associated with log buffers available to log records associated with database transactions in a storage device based on statistics that relate to logging previous records associated with previous database transactions in the storage device;
- log one or more current records associated with one or more current database transactions into a current one of the available log buffers until the current log buffer has been filled or an event that requests committing the current log buffer to the storage device occurs;
- commit the one or more current records logged in the current log buffer to a track on the storage device in a current write operation in response to determining that the current log buffer has been filled or the event that requests committing the current log buffer to the storage device has occurred;
- log one or more new records associated with one or more new database transactions that are received during the current write operation into a newly activated one of the available log buffers substantially concurrently with the current write operation committing the one or more current records to the track on the storage device;
- and
- commit at least one of the new records logged in the newly activated log buffer to the track on the storage device in response to the track on the storage device having additional space subsequent to the current write operation committing the one or more current records to the track on the storage device.
A method for variable block logging with log-ahead buffers, comprising:
- determining a number and a size associated with log buffers available to log records associated with database transactions in a storage device based on statistics that relate to logging previous records associated with previous database transactions in the storage device;
- logging one or more current records associated with one or more current database transactions into a current one of the available log buffers until the current log buffer has been filled or an event that requests committing the current log buffer to the storage device occurs;
- committing the one or more current records logged in the current log buffer to a track on the storage device in a current write operation in response to determining that the current log buffer has been filled or the event that requests committing the current log buffer to the storage device has occurred;
- logging one or more new records associated with one or more new database transactions that are received during the current write operation into a newly activated one of the available log buffers substantially concurrently with the current write operation committing the one or more current records to the track on the storage device;
- and
- committing at least one of the new records logged in the newly activated log buffer to the track on the storage device in response to the track on the storage device having additional space subsequent to the current write operation committing the one or more current records to the track on the storage device.
A system for variable block logging with log-ahead buffers, comprising:
- a storage device to store one or more records associated with one or more database transactions;
- and
- one or more processors configured to:
- log the one or more records into a current log buffer until the current log buffer has been filled or an event that requests committing the current log buffer to a storage device occurs;
- and
- perform a current write operation to commit the one or more records logged in the current log buffer to a track on the storage device in response to determining that the current log buffer has been filled or the event that requests committing the current log buffer to the storage device has occurred, wherein to perform the current write operation, the one or more processors are further configured to:
- activate a free or new log buffer;
- log one or more new records received during the current write operation into the activated log buffer substantially concurrently with the current write operation committing the one or more records logged in the current Jog buffer to the track on the storage device;
- determine whether the track on the storage device has additional space subsequent to the current write operation committing the one or more records logged in the current log buffer to the track on the storage device;
- and
- commit at least one of the one or more new records logged in the activated log buffer to the additional space associated with the track on the storage device during the current write operation in response to the track on the storage device having the additional space.
A method for variable block logging with log-ahead buffers, comprising:
- receiving one or more records associated with one or more database transactions;
- logging the one or more records into a current log buffer until the current log buffer has been filled or an event that requests committing the current log buffer to a storage device occurs;
- and
- performing a current write operation to commit the one or more records logged in the current log buffer to a track on the storage device in response to determining that the current log buffer has been filled or the event that requests committing the current log buffer to the storage device has occurred, wherein performing the current write operation includes:
- activating a free or new log buffer;
- logging one or more new records received during the current write operation into the activated log buffer substantially concurrently with the current write operation committing the one or more records logged in the current log buffer to the track on the storage device;
- determining whether the track on the storage device has additional space subsequent to the current write operation committing the one or more records logged in the current log buffer to the track on the storage device;
- and
- committing at least one of the one or more new records logged in the activated log buffer to the additional space associated with the track on the storage device during the current write operation in response to determining that the track on the storage device has the additional space.
Dependencies are inferred from the claim text.