Distributed Transaction Commit via Log Sequence Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current distributed transaction commitment protocols, such as two-phase commit (2PC) and two-interval commit (2IC), are not message efficient, leading to excessive messaging requirements in distributed systems.
Innovation Solution
A method that tracks tail log sequence numbers and max log sequence numbers for each participant node, allowing transaction commitment only when all participant nodes have flushed their respective log records, thereby reducing messaging traffic by piggybacking these numbers on existing messages.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If two-phase commit (2PC) protocol is used to ensure data consistency, then reliability is improved, but messaging overhead increases significantly
Solution Approach 1:
The patent combines multiple commit protocols (2PC and 2IC) into a hybrid approach that merges the reliability guarantees of 2PC with the reduced messaging overhead of 2IC. The system integrates preparatory phase logic with interval-based commit messaging to achieve both consistency and efficiency.
Solution Approach 2:
The commit process is segmented into distinct phases: a preparatory phase where participants vote on commit readiness, and a commit phase where the actual commitment occurs. This segmentation allows the system to separate the heavy messaging requirements from the critical commit decision, reducing overall overhead.
2Quantity of substance
If two-interval commit (2IC) protocol is used to reduce messaging, then messaging overhead is reduced, but message efficiency remains insufficient
Solution Approach 1:
The system performs preliminary actions by having participant nodes vote on commit readiness during a preparatory phase before the actual commit occurs. This preliminary voting allows the coordinator to determine commit feasibility early, avoiding unnecessary commit messaging and improving overall message efficiency.
Solution Approach 2:
The system implements feedback mechanisms where participant nodes send vote results back to the coordinator, and the coordinator uses this feedback to determine whether to proceed with the commit. This feedback loop enables the system to adapt messaging based on actual participant readiness, optimizing message efficiency.
3Reliability
If traditional commit protocols are used to ensure data persistence, then reliability is improved, but transaction commit time increases
Solution Approach 1:
The system performs preliminary log flushing and vote collection before the actual commit decision. By preparing participant nodes in advance and determining commit feasibility early, the system reduces the time required for the critical commit phase while maintaining data persistence guarantees.
Solution Approach 2:
The system skips unnecessary messaging steps by using the preparatory phase to determine commit readiness. Once votes are collected and commit feasibility is confirmed, the system rushes through the commit phase efficiently, avoiding prolonged messaging overhead while ensuring data persistence.
Data Source
AI summary
A method for committing transactions in a distributed system are provided. The method provides for receiving a request from a client to commit a transaction at a coordinator node in the distributed system, tracking a tail log sequence number for every other node in the distributed system, determining a max log sequence number associated with the transaction for each participant node in the distributed system, and committing the transaction at the coordinator node when the tail log sequence number for each participant node is greater than or equal to the max log sequence number associated with the transaction at the respective participant node.


