Distributed Transaction Logging via Parallel Serialization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional distributed transaction systems experience significant latency due to the coordinator's delay in serializing and persisting the state of distributed transactions until all responses are received, leading to idle processor cycles and increased I/O overhead.
Innovation Solution
The introduction of a logging optimized two-phase protocol that performs serialization and persistence of transaction log records in parallel with receiving responses, utilizing persistent memory with byte-addressable access to reduce latency and processor cycles.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the coordinator waits to serialize and persist the transaction log record until all responses are received, then the ACID properties are ensured, but the execution time and processor idle cycles increase
Solution Approach 1:
The coordinator performs preliminary serialization of the transaction log record during the voting phase, before all responses are received. This preliminary action allows the log record to be prepared in advance, reducing the execution time while maintaining ACID properties through subsequent validation and conditional persistence based on voting results.
2Reliability
If the coordinator delays disk writes until the transaction decision is made, then data consistency is maintained, but I/O overhead and latency increase
Solution Approach 1:
The coordinator performs preliminary serialization of the transaction log record during the voting phase, preparing the log in advance before the final decision is made. This reduces I/O overhead and latency while maintaining data consistency through conditional persistence based on voting results.
Solution Approach 2:
The system dynamically adjusts the persistence timing of the transaction log record based on the voting outcomes. If all participants vote to commit, the log is persisted; otherwise, it is discarded. This dynamic approach optimizes transaction throughput while ensuring data consistency.
3Reliability
If the coordinator processes transaction log serialization sequentially after receiving all responses, then correctness is ensured, but processor cycles are wasted
Solution Approach 1:
The coordinator performs preliminary serialization of the transaction log record during the voting phase, utilizing processor cycles that would otherwise be idle. This preliminary action ensures correctness through subsequent validation while improving processor cycle utilization by keeping the processor busy during the voting phase.
Data Source
AI summary
Systems and methods are described for optimizing logging of decision outcomes in distributed transaction protocols. An example method may comprise: executing, by a processing device, a transaction manager to coordinate a distributed transaction for a plurality of participants; transmitting, by the processing device via the transaction manager, prepare messages to the plurality of participants; serializing a transaction log record of the distributed transaction in parallel with the transmitting of the prepare messages; speculatively writing the serialized transaction log record in persistent memory while the transaction manager performs the serializing of the transaction log record; and updating a speculative indicator associated with the distributed transaction to indicate validity of the transaction log record.


