System and method for logging transaction records in a computer system
First Claim
1. A method comprising:
- providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which a transaction must complete to be valid;
providing a current time;
writing a first transaction to a log file;
completing the first transaction;
writing a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
writing the completed first transaction to a completed transaction file;
writing a second transaction to the log file;
reading the second transaction from the log;
writing the second transaction to an uncompleted transaction file;
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
reading the contents of the log file and contents of the uncompleted transaction file, wherein the contents of the log file include the completion record for the second transaction and wherein the contents of the uncompleted transaction file include the second transaction;
determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file and writing the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
reading the contents of the log file and contents of the uncompleted transaction file;
writing a third transition to a log file, wherein the third transaction includes a transition start time, wherein the transaction start time indicates a time at which the third transaction began; and
writing the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded the transaction time limit.
1 Assignment
0 Petitions
Accused Products
Abstract
An improved method and system for logging transaction records in a computer system. The method may include writing a confirmation log record to the log file for a transaction that completes normally, and not writing a confirmation log record for transactions that are aborted. The log file may be unloaded periodically by an unload program. The unload program may write transaction log records accompanied by a confirmation log record to a good output file and transaction log records not accompanied by a confirmation log record to a suspended output file. On a subsequent execution, the unload program may combine the log records in the log file and the suspended file. The unload program may write transaction log records accompanied by a confirmation log record to a good output file. The unload program may write transaction log records not accompanied by a confirmation log record and which have not exceeded a transaction time limit to a suspended output file. The unload program may write transaction log records not accompanied by a confirmation log record and which have exceeded a transaction time limit to a disposal output file. The transaction log records in the good output file may then be processed normally by log processing programs.
-
Citations
43 Claims
-
1. A method comprising:
-
providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which a transaction must complete to be valid;
providing a current time;
writing a first transaction to a log file;
completing the first transaction;
writing a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
writing the completed first transaction to a completed transaction file;
writing a second transaction to the log file;
reading the second transaction from the log;
writing the second transaction to an uncompleted transaction file;
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
reading the contents of the log file and contents of the uncompleted transaction file, wherein the contents of the log file include the completion record for the second transaction and wherein the contents of the uncompleted transaction file include the second transaction;
determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file and writing the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
reading the contents of the log file and contents of the uncompleted transaction file;
writing a third transition to a log file, wherein the third transaction includes a transition start time, wherein the transaction start time indicates a time at which the third transaction began; and
writing the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded the transaction time limit. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
calculating a transaction elapsed time for the third transaction by subtracting the current time from the transaction start time; comparing the transaction elapsed time of the third transaction to the transaction time limit.
-
-
3. The method of claim 1, wherein at least one transaction comprises at least one transaction record, and wherein a transaction record comprises at least one field.
-
4. The method of claim 1, wherein at least one transaction record further comprises an identifier field, wherein the identifier field is unique to the transaction, such that the identifier field uniquely identifies a transaction record as belonging to a particular transaction, and such that the identifier field is used to distinguish the particular transaction from other transactions.
-
5. The method of claim 1, wherein at least one transaction record further comprises a time field, wherein the time field comprises a time stamp.
-
6. The method of claim 1, wherein the identifier field is the time field, wherein the time stamp is a time at which the transaction was started.
-
7. The method of claim 1, wherein one transaction record is a completion record comprising a time field and a transaction complete field, wherein the transaction complete field includes information identifying a record as a completion record.
-
8. The method of claim 1, wherein at least one transaction includes a program identifier, wherein the program identifier is a unique piece of data that indicates which program of a plurality of programs generated the transaction.
-
9. The method of claim 1, wherein a logger interface program is configured to accept transactions generated by programs and send the transactions to a system logger.
-
10. The method of claim 9, wherein the system logger is a component of an operating system.
-
11. The method of claim 9, further comprising,
the logger interface program receiving the first transaction from a first program; -
the logger interface program sending the first transaction to the system logger;
the logger interface program receiving the second transaction from a second program; and
the logger interface program sending the second transaction to the system logger.
-
-
12. The method of claim 9, wherein the logger interface program is executable by a mainframe computer system.
-
13. The method of claim 1,
wherein reading transactions from the log file further comprises a logger unload program reading transactions from the log file; -
wherein writing the completed first transaction to a completed transaction file further comprises the logger unload program writing the completed first transaction to a completed transaction file; and
wherein writing the second transaction to an uncompleted transaction file further comprises the logger unload program writing the second transaction to an uncompleted transaction file.
-
-
14. The method of claim 13, further comprising:
-
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
the logger unload program reading contents of the log file and contents of the uncompleted transaction file;
the logger unload program determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file; and
the logger unload program writing the completed second transaction to the completed transaction file in response to the logger unload program determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file.
-
-
15. The method of claim 14, further comprising:
-
the logger unload program reading contents of the log file mid contents of the uncompleted transaction file;
the logger unload program calculating a transaction elapsed time for the third transaction by subtracting the current time from the transaction start time;
the logger unload program comparing the transaction elapsed time of the third transaction to the transaction time limit; and
the logger unload program writing the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded the transaction time limit.
-
-
16. A method for logging transactions in a computer systems the method comprising;
-
providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which the transaction must complete to be valid;
providing a current time;
starting a first transaction;
writing a first record for the first transaction to a log file;
starting a second transaction;
writing a first record of the second transaction to the log file;
starting a third transaction;
writing a first record of the third transaction to the log file;
completing the first transaction;
writing a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
reading the first record for the first transaction, the first record for the second transaction, the first record for the third transaction and the completion record for the first transaction from the log file;
writing the completed first transaction to a completed transaction file;
writing the second transaction and the third transaction to an uncompleted transaction file;
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed aborting the third transaction;
reading the contents of the log file and contents of the uncompleted transaction file;
determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
writing the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
calculating a transaction elapsed time for the third transaction by subtracting a time stamp of the first record of the third transaction from the current time;
comparing the transaction elapsed lime of the third transaction to the transaction time limit; and
writing the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded the transaction time limits.
-
-
17. A carrier medium comprising program instructions, wherein the program instructions are executable by a machine to implement:
-
providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which the transaction must complete to be valid;
providing a current time;
writing a first transaction to a log file;
writing a second transaction to the log file, writing a third transaction to the log file;
wherein the third transaction includes a transaction start time, wherein the transaction start time indicates a time at which the third transaction began;
completing the first transaction;
writing a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
reading the completed first transaction from the log file;
reading the second transaction from the log file;
writing the completed first transaction to a completed transaction file;
writing the second transaction to an uncompleted transaction file;
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
reading contents of the log file and contents of the uncompleted transaction file;
determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
writing the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
reading the contents of the log file and contents of the uncompleted transaction file;
calculating a transaction elapsed time for the third transaction by subtracting a time stamp of the first record of the third transaction from the current time, comparing the transaction elapsed time of the third transaction to the transaction time limit. writing the third transaction to an aborted transaction file when the transaction elapsed time of third transaction exceeds the transaction time limit. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
the logger interface program receiving the first transaction from a first program;
the logger interface program sending the first transaction to the system logger;
the logger interface program receiving the second transaction from a second program;
the logger interface program sending the second transaction to the system logger.
-
-
27. The carrier medium of claim 17, wherein the machine is a mainframe computer system.
-
28. The carrier medium of claim 17,
wherein reading transactions from the log file comprises a logger unload program executable for reading transactions from the log file; -
wherein writing the completed first transaction to a completed transaction file comprises the logger unload program executable for writing the completed first transaction to a completed transaction file; and
wherein writing the second transaction to an uncompleted transaction file comprises the logger unload program executable for writing the second transaction to an uncompleted transaction file.
-
-
29. The carrier medium of claim 28, wherein the program instructions are further executable by the machine to implement:
-
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
the logger unload program reading contents of the log file and contents of the uncompleted transaction file;
the logger unload program determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file; and
the logger unload program writing the completed second transaction to the completed transaction file in response to the logger unload program determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file.
-
-
30. The carrier medium of claim 28, wherein the program instructions are further executable by the machine to implement:
-
providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which the transaction must complete to be valid;
providing a current time;
writing a third transaction to the log file, wherein the third transaction includes a transaction start time) wherein the transaction start time indicates a time at which the third transaction began;
the logger unload program reading contents of the log file and contents of the uncompleted transaction file;
the logger unload program calculating a transaction elapsed time for the third transaction by subtracting the current time from the transaction start time, the logger unload program comparing the transaction elapsed time of the third transaction to the transaction time limit; and
the logger unload program writing the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded tile transaction time limit.
-
-
31. The carrier medium of claim 17, wherein the carrier medium is a memory medium.
-
32. A system comprising,
a processing unit; -
a system clock coupled to the processing unit;
a system memory coupled to the processing unit;
a data storage coupled to the processing unit;
wherein the system memory stores program instructions, wherein the program instructions are executable by the processing unit to;
write a First transaction to a log file in the data storage;
write a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
write a second transaction to the log file;
read the completed first transaction from the log file;
read the second transaction from the log file;
write the completed first transaction to a completed transaction file in the data storage;
write the second transaction to an uncompleted transaction file in the data storage;
complete the second transaction;
write a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
read the contents of the log file and contents of the uncompleted transaction file, wherein the contents of the log file include the completion record for the second transaction, and wherein the contents of the uncompleted transaction file include the second transaction;
determine that the second transaction from die uncompleted transaction file corresponds to the completion record for the second transaction front the log file;
write the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
provide a transaction time limit for transactions, wherein the transaction time limit indicates a time by which the transaction must complete to be valid;
determine a current time by reading the system clock;
write the third transaction to the log files wherein the third transaction includes a transaction start time, wherein the transaction start time indicates a time at which the third transaction began;
read the contents of the log file and contents of the uncompleted transaction file;
calculate a transaction elapsed time for the third transaction by subtracting the current time from the transaction start time;
compare the transaction elapsed time of the third transaction to the transaction time limit; and
write the third transaction to an aborted transaction file when the transaction elapsed time of the third transaction has exceeded the transaction time limit. - View Dependent Claims (33, 34, 35, 36, 37, 38, 39, 40, 41)
wherein the program instructions further comprise a first application program and a second application program; wherein the logger interface program is executable to receive the first transaction from a first program;
wherein the logger interface program is executable to send the first transaction to the system logger;
wherein the logger interface program is executable to receive the second transaction from a second program;
wherein the logger interface program is executable to send the second transaction to the system logger;
wherein the system logger is executable to write the first transaction to the log file and write the second transaction to the log file.
-
-
42. A carrier medium comprising program instructions, wherein the program instructions are executable by a machine to implement:
-
providing a transaction time limit for transactions, wherein the transaction time limit indicates a time by which the transaction must complete to be valid;
providing a current time;
starting a first transaction;
writing a first record for the first transaction to a log file;
starting a second transaction;
writing a first record for the second transaction to the log file;
starting a third transaction;
writing a first record for the third transaction;
completing the first transaction;
writing a completion record for the first transaction to the log file, wherein the completion record indicates that the first transaction has completed;
reading the first record for the first transaction, the first record for the second transaction, the first record for the third transaction and the completion record for the first transaction from the log file;
writing the completed first transaction to a completed transaction file;
writing the second transaction and the third transaction to an uncompleted transaction file;
completing the second transaction;
writing a completion record for the second transaction to the log file, wherein the completion record indicates that the second transaction has completed;
reading contents of the log file and contents of the uncompleted transaction file;
determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file;
writing the completed second transaction to the completed transaction file in response to determining that the second transaction from the uncompleted transaction file corresponds to the completion record for the second transaction from the log file, calculating a transaction elapsed time for the third transaction by subtracting a time stamp of the first record of the third transaction from the current time;
comparing the transaction elapsed time of the third transaction to the transaction time limit, writing the third transaction to an aborted transaction file when the transaction elapsed time of third transaction exceeds the transaction time limit. - View Dependent Claims (43)
-
Specification