Multi-Partition Transaction Processing via Consistent Data Snapshots
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database transaction processing systems struggle with ensuring consistency across multiple distributed services, leading to low system throughput and service levels due to blocking between multi-partition and single-partition transactions.
Innovation Solution
A transaction processing method that involves obtaining consistent data snapshots across multiple data partitions for multi-partition transactions, allowing for parallel execution of read and write transactions to avoid blocking and improve throughput and service levels.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the server processes multi-partition transactions cooperatively across multiple data partitions to ensure consistency, then data consistency is improved, but system throughput deteriorates due to blocking between multi-partition and single-partition transactions
Solution Approach 1:
The patent segments the transaction processing system into multiple independent transaction queues, each associated with a specific data partition. Single-partition transactions are routed to dedicated queues while multi-partition transactions are routed to all relevant queues. This segmentation allows single-partition transactions to be processed independently without being blocked by multi-partition transactions, thereby improving system throughput while maintaining data consistency through the cooperative processing mechanism.
2Reliability
If the server waits for multi-partition transaction completion before processing subsequent single-partition transactions, then data consistency is ensured, but processing time increases
Solution Approach 1:
The patent implements preliminary action by having the server obtain data snapshots for all data partitions involved in a multi-partition transaction before executing the transaction. These snapshots capture the state of data partitions at the beginning of the transaction. By preparing these snapshots in advance and using them for consistency checks, the system can quickly determine whether single-partition transactions can proceed without waiting for multi-partition transaction completion, thus reducing processing time while ensuring consistency.
3Ease of operation
If the server uses transaction queues for each data partition to manage transactions, then transaction organization is improved, but blocking occurs when multi-partition transactions are processed
Solution Approach 1:
The patent introduces an intermediary mechanism in the form of a snapshot management system that mediates between multi-partition and single-partition transactions. The snapshot serves as an intermediary data structure that captures the state of data partitions, allowing the system to check consistency without direct blocking. This intermediary mechanism enables single-partition transactions to proceed independently by checking against snapshots rather than waiting for multi-partition transaction completion, thereby improving throughput while maintaining organized transaction management.
Data Source
Figure 1~2A
Figure 2B~3
Figure 4(a)~4(b)
AI summary
This application provides a transaction processing method, apparatus, and device, and relates to the field of database technologies. The method includes: receiving a multi-partition transaction, where the multi-partition transaction is a transaction of performing an operation in at least two data partitions; obtaining data snapshots that respectively correspond to the at least two data partitions and that meet consistency; and performing the operation corresponding to the multi-partition transaction based on the data snapshots that respectively correspond to the at least two data partitions and that meet consistency. According to this application, data snapshots meeting consistency are obtained for data partitions related to a multi-partition transaction, and an operation corresponding to the multi-partition transaction is performed based on the data snapshots. Parallel execution of a read transaction and a write transaction is supported, to avoid blocking between the write transaction and the read transaction, thereby improving a system throughput and a service level.