Clustered Database Lock Synchronization Mode Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The strong synchronization locking mechanism in clustered databases requires all computing devices to obtain locks, leading to increased lock acquisition costs as the number of devices increases, resulting in low processing capability.
Innovation Solution
Implementing a request processing method that determines a lock synchronization mode, allowing direct locking in a weak synchronization mode and obtaining locking feedback in other modes to satisfy target conditions for lock acquisition, thereby improving processing capability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a strong synchronization locking mechanism is used to ensure data consistency across all computing devices, then data reliability is improved, but the processing capability and system productivity deteriorate due to increased lock acquisition costs and waiting time
Solution Approach 1:
The patent implements dynamic lock synchronization modes that can switch between strong and weak synchronization based on service scenarios. The system dynamically adjusts the locking strategy: using strong synchronization when data consistency is critical and weak synchronization when processing speed is prioritized, thereby resolving the contradiction between reliability and productivity
Solution Approach 2:
The patent introduces a lock synchronization mode parameter that can be changed to adjust the degree of synchronization. By changing this parameter, the system can transition between different locking behaviors (strong vs. weak synchronization), allowing optimization of both data consistency and processing capability based on specific requirements
2Quantity of substance
If the number of computing devices in the cluster is increased to enhance system capacity, then processing potential is improved, but the lock acquisition cost and system complexity increase significantly
Solution Approach 1:
The patent segments the lock synchronization process into different modes and levels. Instead of requiring all devices to participate in every lock acquisition, the system divides the synchronization requirement into segments where only necessary devices need to coordinate, reducing the complexity growth that would otherwise result from adding more computing devices to the cluster
3Reliability
If strong synchronization locking is used to ensure all devices obtain locks before processing, then data reliability is improved, but the lock application time and system response time increase
Solution Approach 1:
The patent applies partial synchronization by obtaining locking feedback information from only the necessary number of second computing devices rather than requiring all devices to confirm lock acquisition. This partial action approach reduces lock application time while maintaining sufficient data consistency guarantees for the specific service scenario
Data Source
AI summary
This application discloses request processing methods and apparatuses. The request processing method, performed by a first computing device in a clustered database includes determining a lock synchronization mode of the clustered database in response to a data request; locking a data resource corresponding to the data request when the lock synchronization mode is a weak synchronization mode, and executing the data request; obtaining locking feedback information about the data resource by at least one second computing device in the clustered database when the lock synchronization mode is not the weak synchronization mode, the locking feedback information indicating whether the second computing device has locked the data resource; and locking the data resource corresponding to the data request when the obtained locking feedback information satisfies a target condition corresponding to the lock synchronization mode, and executing the data request.


