Logical-Time Transaction Processing for Distributed Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database systems face challenges in ensuring transaction consistency and efficiency, particularly in distributed environments, where concurrent operations can lead to data exceptions and performance issues.
Innovation Solution
A transaction processing method and apparatus that involve obtaining read and write sets for a target transaction, determining logical begin and end times, updating the begin time based on the write set to conform to a concurrent consistency level, and committing the transaction only if the updated begin time is less than or equal to the end time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional concurrent access control technologies are used to ensure transaction consistency, then data correctness is maintained, but system performance and throughput deteriorate due to locking mechanisms and validation overhead
Solution Approach 1:
The system performs preliminary validation by determining logical begin time and end time for transactions before actual execution. This advance timing validation allows the system to pre-check for potential conflicts and determine transaction compatibility without requiring blocking locks during execution, thus maintaining consistency while improving performance
Solution Approach 2:
The patent introduces logical begin time and end time as intermediary parameters that mediate between concurrent transactions. These timing parameters serve as a coordination mechanism that replaces traditional locking, allowing the system to validate transaction compatibility through time-based checks rather than direct resource contention, thereby resolving the contradiction between consistency and performance
2Reliability
If strict isolation levels are implemented to prevent data exceptions in concurrent operations, then transaction reliability is improved, but system throughput and processing speed worsen due to increased validation and control overhead
Solution Approach 1:
The system changes the parameter used for conflict detection from resource-based locking to time-based validation. By using logical begin time and end time parameters, the system can validate transaction compatibility through simple temporal comparisons rather than complex lock management, maintaining reliability while improving processing speed
Solution Approach 2:
Transactions perform self-validation by comparing their own logical timing parameters against the concurrent consistency level requirements. This self-service approach eliminates the need for centralized lock management and reduces validation overhead, allowing high-speed processing while maintaining transaction reliability
3Reliability
If concurrent access control mechanisms are used to manage multiple transactions, then data correctness is maintained, but device complexity and implementation difficulty increase
Solution Approach 1:
The patent extracts the essential conflict detection function from complex locking mechanisms and isolates it into a separate timing validation step. By determining logical begin time and end time beforehand, the system separates the validation logic from the execution logic, simplifying the control mechanism while maintaining data correctness
Solution Approach 2:
The system performs preliminary timing determination and validation before transaction execution. This advance preparation simplifies the actual execution phase by pre-resolving potential conflicts, reducing the complexity of runtime control mechanisms while ensuring data correctness
4Reliability
If traditional transaction validation is performed to ensure concurrent consistency, then data exceptions are prevented, but transaction processing time and overhead increase
Solution Approach 1:
The system performs validation of logical begin time and end time against concurrent consistency requirements before transaction commitment. This preliminary validation identifies incompatible transactions early, preventing unnecessary execution and reducing overall validation time by avoiding rejections during later stages
Solution Approach 2:
The patent replaces traditional mechanical locking and validation mechanisms with a time-based validation system. By using logical timing parameters and simple temporal comparisons, the system achieves concurrent consistency validation with minimal computational overhead, significantly reducing validation time compared to traditional approaches
Data Source
AI summary
This application discloses a transaction processing method and apparatus, a computer device, and a storage medium, and relates to the technical field of databases. The method includes: obtaining a read set and a write set of a target transaction in response to a read-write operation of the target transaction; determining a logical begin time and a logical end time of the target transaction in response to a validation instruction of the target transaction; updating the logical begin time based on the write set in response to the logical begin time and the logical end time conforming to a concurrent consistency level of the target transaction, to obtain an updated logical begin time; and committing the target transaction in response to the updated logical begin time being less than or equal to the logical end time.


