Database Concurrency Protocol With Optimistic Execution Validation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing concurrency control protocols in databases face challenges in achieving efficient performance while maintaining transaction consistency, with optimistic approaches incurring high abortion rates and pessimistic approaches causing performance reduction through blocking operations.
Innovation Solution
A concurrency control protocol that employs an optimistic approach during the working phase to allow independent transaction execution without locks, followed by a pessimistic validation phase to ensure transaction integrity, reducing aborts and enabling faster transaction processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If an optimistic concurrency control approach is used to allow concurrent transaction execution without blocking, then transaction throughput and parallelism are improved, but transaction abort rate increases due to isolation rule violations
Solution Approach 1:
The transaction execution process is segmented into two distinct phases: an optimistic execution phase where transactions run concurrently without locks, and a pessimistic validation phase where isolation rules are checked. This segmentation allows high parallelism during execution while ensuring consistency during validation, resolving the contradiction between throughput and abort rate.
Solution Approach 2:
Transactions perform preliminary execution of their operations during the optimistic phase before validation occurs. This preliminary action allows transactions to make progress without blocking, improving throughput, while the subsequent validation phase ensures consistency by checking isolation rules before commit.
2Reliability
If a pessimistic concurrency control approach is used to block operations that may violate consistency rules, then transaction consistency is maintained, but performance decreases due to blocking operations
Solution Approach 1:
The system segments pessimistic consistency checks to occur only during the validation phase after transaction execution, rather than applying pessimistic blocking throughout the entire transaction lifecycle. This allows consistency to be maintained while minimizing the impact on performance during the execution phase.
Solution Approach 2:
Transactions perform preliminary execution of all operations during the optimistic phase before pessimistic validation occurs. This preliminary action eliminates the need for continuous blocking during execution, improving performance while maintaining consistency through the subsequent validation phase.
3Reliability
If concurrency control protocols are implemented to ensure transaction isolation and serializability, then data integrity is maintained, but system complexity and overhead increase
Solution Approach 1:
The concurrency control mechanism is segmented into two phases with different control strategies: optimistic execution phase with minimal overhead and pessimistic validation phase for consistency checking. This segmentation reduces overall system complexity compared to implementing pessimistic control throughout, while maintaining data integrity.
Solution Approach 2:
Transactions perform preliminary execution of operations without complex locking mechanisms during the optimistic phase, reducing immediate overhead. The complexity of consistency validation is deferred to the validation phase, where it can be performed more efficiently after the transaction's operation set is known.
Data Source
AI summary
A database system implementing a concurrency control protocol is provided. The database system includes a node connected through a network to a client; the node comprises: a storage for storing a plurality of data cells; one or more processors; and a memory, the memory containing instructions that, when executed by the one or more processors, configure the node to: receive at least one non-commit statement that is part of a transaction; execute locally tasks included in each of the at least one received statement in an optimistic manner allowing statements of other transactions to independently access same data cells in the database system being modified by tasks of the at least one received statement; and return the client an acknowledgment that the transaction is committed, the acknowledgment is returned upon validation of the transaction, wherein the transaction is validated in a pessimistic manner.


