Non-blocking Database Transactions via Synthetic Timestamps
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current database systems face challenges in serving consistent, present-time reads while minimizing the effects of conflicting transactions, particularly between read and write operations, leading to increased latencies and inefficiencies.
Innovation Solution
The implementation of non-blocking transactions using synthetic timestamps, where a synthetic timestamp is generated based on a database node's time and duration, allowing write operations to be executed and acknowledged by replicas without blocking read transactions, enabling followers to serve reads before the write is fully committed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If read transactions wait for write transactions to commit, then data consistency is maintained, but read latency increases
Solution Approach 1:
The system performs preliminary actions by having follower nodes pre-load and prepare data in advance before it is officially committed. Follower nodes replicate write operations locally and can serve reads from their prepared data, eliminating the need for read transactions to wait for formal commit while maintaining consistency through synthetic timestamp validation.
Solution Approach 2:
The patent introduces synthetic timestamps as an intermediary mechanism to mediate between read and write transactions. These synthetic timestamps allow the system to determine whether a read can proceed without waiting for write commit, acting as a mediator that enables early reads while preserving consistency guarantees.
2Productivity
If follower nodes serve reads directly, then network traffic concentration at leaseholder node is reduced, but read consistency with present-time data is compromised
Solution Approach 1:
The system changes the parameter of timestamp validation by introducing synthetic timestamps that differ from actual commit timestamps. This parameter change allows follower nodes to serve reads with present-time data by validating against synthetic timestamps rather than requiring formal commit confirmation, thus maintaining consistency while improving throughput.
3Productivity
If synthetic timestamps are used to enable early reads, then read-write concurrency is improved, but transaction latency management becomes more complex
Solution Approach 1:
The system implements self-service by having follower nodes autonomously generate and manage their own synthetic timestamps without requiring coordination with the leaseholder node. This self-service approach enables early reads at follower nodes while the leaseholder node continues to manage actual commits independently, improving concurrency without significantly increasing overall system complexity.
Data Source
AI summary
Methods and systems for executing non-blocking transactions at a database are provided. The method includes receiving a write transaction that is directed to a partition of a table stored by a cluster of database nodes. The method includes generating, at a database node of the cluster, a synthetic timestamp based on a first time associated with the database node and a duration, wherein the synthetic timestamp exceeds the first time by the duration. The method includes executing, based on determining the synthetic timestamp, one or more operations of the write transaction at one or more replicas of the partition. The method includes committing, based on a threshold number of acknowledgements, the one or more operations of the write transaction at the one or more replicas. The method includes sending, based on a second time exceeding the synthetic timestamp, an indication of success of the write transaction.


