Method, System, and Program for Merging Log Entries From Multiple Recovery Log Files
Abstract
A globally unique transaction identifier for each transaction is recorded in log entries pursuant to a two-phase commit protocol, wherein multiple log entries in multiple database recovery logs that correspond to one transaction have a same globally unique transaction identifier. A causally ordered, ascending timestamp value is maintained in the log entries pursuant to the two-phase commit protocol. For each of the multiple database recovery logs, all the log entries related to a single transaction are marked identically with a mark unique to the single transaction in a given one of the database recovery logs. Global changes are identified for the single transaction from the log entries in the multiple database recovery logs based on the marking and the globally unique transaction identifier for each transaction by reading log entries based on the causally ordered, ascending timestamp value.
Claims
exact text as granted — not AI-modified1 . A method for determining changes caused by a single transaction and transaction order when transaction changes are recorded in multiple database recovery logs containing log entries in support of a two-phase commit protocol, comprising:
recording in the log entries pursuant to the two-phase commit protocol a globally unique transaction identifier for each transaction, wherein multiple log entries in multiple database recovery logs that correspond to one transaction have a same globally unique transaction identifier; maintaining in the log entries pursuant to the two-phase commit protocol a causally ordered, ascending timestamp value; for each of the multiple database recovery logs, marking identically all the log entries related to a single transaction with a mark unique to the single transaction in a given one of the database recovery logs; and identifying global changes for the single transaction from the log entries in the multiple database recovery logs based on the marking and the globally unique transaction identifier for each transaction by reading log entries based on the causally ordered, ascending timestamp value.
2 . The method of claim 1 , further comprising:
recording in the log entries changes to a database made by application driven transactions.
3 . The method of claim 1 , further comprising:
examining sequentially the entries of at least one of the database recovery logs.
4 . The method of claim 1 , further comprising:
determining which log entry is a next log entry to be read from the database recovery log having a minimal preceding causally ordered, ascending timestamp in a log entry of a kind related to the two-phase commit protocol.
5 . The method of claim 1 , wherein identifying global changes further comprises:
combining logically next log entries into groups marked identically as belonging to a same transaction within a given one of the database recovery logs, the entries of the combined group being ordered by the order dictated by a sequential examination of log entries in a database recovery log.
6 . The method of claim 5 , further comprising:
examining a logically next log entry comprising an MPP prepare entry or an MPP commit entry, wherein the combined group of identically marked log entries is identified as a completed combined group identified by the globally unique transaction identifier.
7 . The method of claim 6 , comprising:
examining a logically next log entry of the coordinator commit entry kind; and combining all completed combined groups identified by the same globally unique transaction identifier into a complete transaction, wherein the complete transaction is a next transaction in a transaction order.
8 . The method of claim 6 , wherein no log entries of the coordinator commit kind are available but an entry of single subordinate commit kind is examined.
9 . The method of claim 1 , further comprising:
when there is no sequentially next log entry for one of the database recovery logs, generating a causally ordered, ascending timestamp value that would be maintained in a next log entry.
10 . The method of claim 1 , further comprising:
generating a causally ordered, ascending timestamp value by selecting a greater of a current time or a number greater than a last generated or observed causally ordered, ascending timestamp.
11 . The method of claim 10 , wherein the casually ordered, ascending timestamp may be passed in a two-phase commit protocol message.
12 . A method to coordinate processing of complete transactions with specific log entries of each of several database recovery logs, comprising:
processing complete transactions; recording an address in each log entry of an earliest reported log entry for a transaction which is not complete and not yet processed along with the causally ordered, ascending timestamp of the log entry of the commit kind for the most recently completed and processed transaction; and atomically committing the changes pursuant to the processing of completed transactions, the earliest reported entries for incomplete transactions, and the causally ordered, ascending timestamp.
13 . The method of claim 12 , wherein some of the database recovery logs have no outstanding reported log entries relating to incomplete transactions and further comprising recording the address of a next log entry that could be reported from that log.
14 . A method to resume determining changes and transaction order following a failure or normal termination, comprising:
retrieving addresses of earliest reported log entries for transactions which are not complete and causally ordered, ascending timestamp for a most recently completed and processed transaction; initiating examination of each of multiple recovery logs at the retrieved addresses; and ignoring completed transactions whose causally ordered, ascending timestamp from log entry of the commit kind is less than or equal to the retrieved causally ordered, ascending timestamp.
15 . An article of manufacture including code for determining changes caused by a single transaction and transaction order when transaction changes are recorded in multiple database recovery logs containing log entries in support of a two-phase commit protocol, wherein the code is capable of causing operations, the operations comprising:
recording in the log entries pursuant to the two-phase commit protocol a globally unique transaction identifier for each transaction, wherein multiple log entries in multiple database recovery logs that correspond to one transaction have a same globally unique transaction identifier; maintaining in the log entries pursuant to the two-phase commit protocol a causally ordered, ascending timestamp value; for each of the multiple database recovery logs, marking identically all the log entries related to a single transaction with a mark unique to the single transaction in a given one of the database recovery logs; and identifying global changes for the single transaction from the log entries in the multiple database recovery logs based on the marking and the globally unique transaction identifier for each transaction by reading log entries based on the causally ordered, ascending timestamp value.
16 . The article of manufacture of claim 15 , wherein the operations further comprise:
recording in the log entries changes to a database made by application driven transactions.
17 . The article of manufacture of claim 15 , wherein the operations further comprise:
examining sequentially the entries of at least one of the database recovery logs.
18 . The article of manufacture of claim 15 , wherein the operations further comprise:
determining which log entry is a next log entry to be read from the database recovery log having a minimal preceding causally ordered, ascending timestamp in a log entry of a kind related to the two-phase commit protocol.
19 . The article of manufacture of claim 15 , wherein identifying global changes further comprises:
combining logically next log entries into groups marked identically as belonging to a same transaction within a given one of the database recovery logs, the entries of the combined group being ordered by the order dictated by a sequential examination of log entries in a database recovery log.
20 . The article of manufacture of claim 19 , wherein the operations further comprise:
examining a logically next log entry comprising an MPP prepare entry or an MPP commit entry, wherein the combined group of identically marked log entries is identified as a completed combined group identified by the globally unique transaction identifier.
21 . The article of manufacture of claim 20 , comprising:
examining a logically next log entry of the coordinator commit entry kind; and combining all completed combined groups identified by the same globally unique transaction identifier into a complete transaction, wherein the complete transaction is a next transaction in a transaction order.
22 . The article of manufacture of claim 20 , wherein no log entries of the coordinator commit kind are available but an entry of single subordinate commit kind is examined.
23 . The article of manufacture of claim 15 , wherein the operations further comprise:
when there is no sequentially next log entry for one of the database recovery logs, generating a causally ordered, ascending timestamp value that would be maintained in a next log entry.
24 . The article of manufacture of claim 15 , wherein the operations further comprise:
generating a causally ordered, ascending timestamp value by selecting a greater of a current time or a number greater than a last generated or observed causally ordered, ascending timestamp.
25 . The article of manufacture of claim 24 , wherein the casually ordered, ascending timestamp may be passed in a two-phase commit protocol message.
26 . An article of manufacture including code to coordinate processing of complete transactions with specific log entries of each of several database recovery logs, wherein the code is capable of causing operations, the operations comprising:
processing complete transactions; recording an address in each log entry of an earliest reported log entry for a transaction which is not complete and not yet processed along with the causally ordered, ascending timestamp of the log entry of the commit kind for the most recently completed and processed transaction; and atomically committing the changes pursuant to the processing of completed transactions, the earliest reported entries for incomplete transactions, and the causally ordered, ascending timestamp.
27 . The article of manufacture of claim 26 , wherein some of the database recovery logs have no outstanding reported log entries relating to incomplete transactions and further comprising recording the address of a next log entry that could be reported from that log.
28 . An article of manufacture including code to resume determining changes and transaction order following a failure or normal termination, wherein the code is capable of causing operations, the operations comprising:
retrieving addresses of earliest reported log entries for transactions which are not complete and causally ordered, ascending timestamp for a most recently completed and processed transaction; initiating examination of each of multiple recovery logs at the retrieved addresses; and ignoring completed transactions whose causally ordered, ascending timestamp from log entry of the commit kind is less than or equal to the retrieved causally ordered, ascending timestamp.
29 . A system for determining changes caused by a single transaction and transaction order when transaction changes are recorded in multiple database recovery logs containing log entries in support of a two-phase commit protocol, comprising:
a set of nodes, each node having a recovery log; and a computer program executable by a computer, wherein the computer program comprises instructions for:
recording in the log entries pursuant to the two-phase commit protocol a globally unique transaction identifier for each transaction, wherein multiple log entries in multiple database recovery logs that correspond to one transaction have a same globally unique transaction identifier;
maintaining in the log entries pursuant to the two-phase commit protocol a causally ordered, ascending timestamp value;
for each of the multiple database recovery logs, marking identically all the log entries related to a single transaction with a mark unique to the single transaction in a given one of the database recovery logs; and
identifying global changes for the single transaction from the log entries in the multiple database recovery logs based on the marking and the globally unique transaction identifier for each transaction by reading log entries based on the causally ordered, ascending timestamp value.
30 . A system to coordinate processing of complete transactions with specific log entries of each of several database recovery logs, comprising:
a set of nodes, each node having a recovery log; and a computer program executable by a computer, wherein the computer program comprises instructions for:
processing complete transactions;
recording an address in each log entry of an earliest reported log entry for a transaction which is not complete and not yet processed along with the causally ordered, ascending timestamp of the log entry of the commit kind for the most recently completed and processed transaction; and
atomically committing the changes pursuant to the processing of completed transactions, the earliest reported entries for incomplete transactions, and the causally ordered, ascending timestamp.
31 . A system to resume determining changes and transaction order following a failure or normal termination, comprising:
a set of nodes, each node having a recovery log; and a computer program executable by a computer, wherein the computer program comprises instructions for:
retrieving addresses of earliest reported log entries for transactions which are not complete and causally ordered, ascending timestamp for a most recently completed and processed transaction;
initiating examination of each of multiple recovery logs at the retrieved addresses; and
ignoring completed transactions whose causally ordered, ascending timestamp from log entry of the commit kind is less than or equal to the retrieved causally ordered, ascending timestamp.Join the waitlist — get patent alerts
Track US2006218206A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.