Logical Transaction ID for Database Idempotence
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing systems fail to provide reliable information about the outcome of database transactions during outages, leading to duplicate submissions and logical corruption, as they lack mechanisms to track and manage transactional states across sessions.
Innovation Solution
The implementation of a Logical Transaction ID (LTXID) system that tracks and manages transactional states, ensuring idempotence by blocking uncommitted transactions and allowing at-most-once execution semantics, even across multiple sessions and servers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the client resubmits transactions after a connection failure, then the system maintains availability and can recover from outages, but duplicate transactions may be executed causing logical corruption
Solution Approach 1:
The server sends a Logical Transaction ID (LTXID) back to the client after each transaction commit. The client uses this LTXID to track which transactions have been successfully committed. After a connection failure, the client can query the server with the LTXID to get feedback on whether the transaction was committed, preventing duplicate submissions while maintaining availability.
Solution Approach 2:
The LTXID acts as an intermediary mechanism between the client and server. It carries transaction state information across connection boundaries, enabling the client to determine whether to resubmit transactions after failures without directly querying transaction state, thus preventing duplication while preserving system availability.
2Reliability
If the server tracks transaction states across sessions using LTXID, then duplicate submissions are prevented, but the system complexity increases
Solution Approach 1:
The patent extracts the transaction state tracking functionality from the complex session management system and encapsulates it in a simple LTXID mechanism. The LTXID is a single identifier that carries all necessary state information, separating the tracking concern from the broader transaction processing system and reducing overall complexity.
Solution Approach 2:
The LTXID serves multiple functions: it uniquely identifies a transaction, tracks its commit state, enables idempotence checking, and facilitates session recovery. This multi-functional approach consolidates what would otherwise require multiple separate mechanisms into a single simple identifier, reducing system complexity.
3Reliability
If the server blocks uncommitted transactions across sessions, then data consistency is maintained, but the processing speed decreases
Solution Approach 1:
The server performs a preliminary check using the LTXID to determine whether a transaction has already been committed before allowing it to proceed. This early detection mechanism prevents unnecessary processing of duplicate transactions and blocks only when truly needed, maintaining data consistency without significantly impacting normal transaction processing speed.
Data Source
AI summary
A method, machine, and computer-readable medium is provided for managing transactional sets of commands sent from a client to a server for execution. A first server reports logical identifiers that identify transactional sets of commands to a client. The first server commits information about a set of commands to indicate that the set has committed. A second server receives, from the client, a request that identifies the set based on the logical identifier that the client had received. The second server determines whether the request identified the latest set received for execution in a corresponding session and whether any transactions in the set have not committed. If any transaction has not committed, the second server enforces uncommitted state of the identified set by blocking completion of the identified set issued in the first session. The identified set may then be executed in the second session without risk of duplication.


