Database Log Management via Transaction Sequence Numbering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In-memory databases and other DBMSs face inefficiencies due to the need for multiple log files when transactions update multiple partitions, leading to increased I/O requests and log output bottlenecks, even when the execution order of transactions does not affect the operation results.
Innovation Solution
A DBMS generates logs for each transaction and records sequence numbers for transactions whose results depend on execution order, allowing for the specification of transaction order and reducing the number of log files needed for output.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a log file is prepared for each partition and logs are output to corresponding log files, then transaction execution order can be specified for updated partitions, but the number of I/O requests increases several times the number of transactions
Solution Approach 1:
The patent merges multiple partition-specific log files into a single log file. Instead of outputting logs to multiple separate log files corresponding to each partition, all logs from all partitions are consolidated into one log file, thereby reducing the number of I/O requests from several times the number of transactions to just one I/O request per transaction.
Solution Approach 2:
The single log file serves multiple functions: it stores logs for all partitions simultaneously and enables transaction order specification for any partition through the use of sequence numbers. This universal log file replaces the need for multiple specialized log files, one for each partition.
2Productivity
If logs are output to a single log file during parallel transaction processing, then I/O requests are reduced, but log output becomes a bottleneck
Solution Approach 1:
The system performs preliminary actions by generating sequence numbers for transactions before they are committed. These sequence numbers are assigned in advance based on transaction start times or other criteria, allowing the log output process to simply record pre-numbered transactions without needing to determine complex execution orders during the actual logging phase.
Solution Approach 2:
The patent changes the parameter of log organization from partition-based separation to sequence-number-based ordering within a single file. By using sequence numbers as the primary organizing parameter instead of partition identifiers, the system achieves both reduced I/O operations and maintained log output speed through efficient sequential writing.
3Reliability
If sequence numbers are recorded for all transactions, then transaction execution order can be fully specified, but the complexity of log management increases
Solution Approach 1:
The patent applies sequence numbers selectively rather than universally. Sequence numbers are assigned and recorded only for transactions that update the same data items, while transactions that update different data items do not require sequence number recording. This local application of sequence numbering reduces log management complexity while maintaining sufficient transaction order specification for correctness.
Data Source
AI summary
A database management system generates a log each transaction during execution of a plurality of transactions and stores the generated logs in log storage areas. The database management system records sequence numbers of logs at least in the generated logs of transactions belonging to a set of transactions of which results are different depending on a transaction execution order.


