IP Library Granted Patent US 8,140,483
Granted Patent B2
US 8,140,483 · App. 12/179,107 · Granted Mar 20, 2012

Transaction log management

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,140,483
App. No.
12/179,107
Granted
Mar 20, 2012
Kind
B2
Abstract

A method and apparatus for managing a log-full condition of a transaction log in a transaction processing system are provided. The transaction log has a plurality of log records each associated with a particular transaction. When a log-full condition is detected, the active transaction having the oldest log entry of all active transactions is identified and logging for all transactions except for the identified transaction is temporarily suspended. A dynamic transaction backout of the identified transaction is initiated, with the writing of a backout record for the identified transaction to the log being delayed. The method waits for confirmation that the backout has completed before trimming the log. Then the delayed backout record for the identified transaction is written to the log and normal logging is resumed.

Claims (50)

1. A method for managing a log-full condition of a transaction log in

a transaction processing system, the transaction log comprising a plurality of log records each associated with a particular transaction, the method comprising:

responsive to detecting the log-full condition, performing:

identifying an active transaction having an oldest log record of all active transactions having records in the log;

temporarily suspending logging for all transactions except for the identified transaction;

initiating a dynamic transaction backout of the identified transaction;

delaying writing of a backout record for the identified transaction to the log; and

sending a notification identifying the transaction for which the writing of the backout record to the log is being delayed;

responsive to receiving confirmation that the backout has completed, performing: trimming the log;

writing the backout record for the identified transaction to the log; and

resuming normal logging; and

responsive to discovery of an incomplete set of log records for a selected transaction, comparing:

comparing whether the selected transaction is the identified transaction for which writing of the backout record was delayed; and when the comparing determines that the selected transaction is the identified transaction, ignoring the discovery of the incomplete set of log records for the selected transaction.

2. A method according to claim 1 , wherein the delaying comprises indicating, when a request to write a backout record to the log for the identified transaction is received, that the requested backout record has been written to the log, without having yet written the requested backout record to the log.

3. A method according to claim 1 , wherein sending the notification comprises storing data identifying the transaction in non-volatile storage allocated for storing the data.

4. A method according to claim 1 , wherein sending the notification comprises sending a message in human-readable form to an administrator.

5. A method according to claim 1 , wherein trimming the log comprises determining a position of an oldest log record still required for any active transaction other than the identified transaction, and deleting log records created before the determined position.

6. A method according to claim 1 , further comprising monitoring an amount of available space on the transaction log to detect the log-full condition.

7. A method according to claim 1 , further comprising entering a log-full mode when the log-full condition is detected.

8. Apparatus for managing a log-full condition of a transaction log in a transaction processing system, the transaction log comprising a plurality of log records each associated with a particular transaction, the apparatus comprising:

a processor; and

code executable, using the processor, to perform:

detecting a log-full condition;

responsive to detecting the log-full condition, identifying an active transaction having an oldest log record of all active transactions having records in the log and temporarily suspending logging for all transactions except for the identified transaction;

initiating a dynamic transaction backout of the identified transaction;

delaying writing of a backout record for the identified transaction to the log;

waiting for confirmation that the backout has completed;

sending a notification identifying the transaction for which the writing of the backout record to the log is being delayed;

responsive to confirmation that the backout has completed, trimming the log, then writing the delayed backout record for the identified transaction to the log, and resuming normal logging; and

responsive to discovery of an incomplete set of log records for a selected transaction, comparing whether the selected transaction is the identified transaction for which the writing of the backout record was delayed and when the comparing determines that the selected transaction is the identified transaction, ignoring the discovery of the incomplete set of log records for the selected transaction.

9. An apparatus according to claim 8 , further comprising indicating, when a request to write a backout record to the log for the identified transaction is received, that the requested backout record has been written to the log, without writing the requested backout record to the log.

10. An apparatus according to claim 8 , further comprising storing the identification of the transaction in non-volatile storage.

11. An apparatus according to claim 8 , further comprising a message emitter for sending the notification in human-readable form to an administrator.

12. An apparatus according to claim 8 , further comprising comparing, responsive to discovery of an incomplete set of log records for a selected transaction, whether the selected transaction is the identified transaction for which the writing of the backout record was delayed.

13. An apparatus according to claim 8 , further comprising determining a position of an oldest log record still required for any active transaction other than the identified transaction, and deleting log records created before the determined position.

14. An apparatus according to claim 8 , further comprising monitoring an amount of available space on the transaction log to detect the log-full condition.

15. A computer program element comprising computer program code to, when loaded into a computer system and executed thereon, cause the computer system to perform a method for managing a log-full condition of a transaction log in a transaction processing system, the transaction log comprising a plurality of log records each associated with a particular transaction, the method comprising:

responsive to detecting the log-full condition, performing:

identifying an active transaction having an oldest log record of all active transactions having records in the log;

temporarily suspending logging for all transactions except for the identified transaction:

initiating a dynamic transaction backout of the identified transaction;

delaying writing of a backout record for the identified transaction to the log; and

sending a notification identifying the transaction for which the writing of the backout record to the log is being delayed;

responsive to receiving confirmation that the backout has completed, performing: trimming the log;

writing the backout record for the identified transaction to the log; and

resuming normal logging; and

responsive to discovery of an incomplete set of log records for a selected transaction, performing:

comparing whether the selected transaction is the identified transaction for which writing of the backout record was delayed; and

when the comparing determines that the selected transaction is the identified transaction, ignoring the discovery of the incomplete set of log records for the selected transaction.

16. A method according to claim 1 , wherein the backout record indicates the dynamic transaction backout for the identified transaction.

Assignments (3)
CHANGE OF NAME Recorded Aug 26, 2014
From: SAP AG
To: SAP SE
Reel/Frame 033625/0334 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 12, 2012
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: SAP AG
Reel/Frame 028540/0522 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 24, 2008
From: MITCHELL, IAN JAMES; WRIGHT, ANDREW
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 021287/0136 →