A high-concurrency transaction locking method and system combining optimistic lock and pessimistic lock
By combining optimistic locking and distributed pessimistic locking in high concurrency trading systems, the dirty data and system availability problems under high concurrency are solved, achieving more efficient performance and smaller system consumption.
CN114036164BActive Publication Date: 2025-06-03CHINA CONSTRUCTION BANK
2 Cites 0 Cited by
Patent Information
- Application Number
- CN202111322477.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-11-09
AI Technical Summary
Technical Problem
In the high concurrent trading scenario, it is difficult for the existing technology to effectively solve the dirty data problem and the reduction of system transaction availability, and the pessimistic locking solution has great pressure on the database and poor flexibility.
Method used
The combination of optimistic lock and pessimistic lock is adopted, and the logical control of pessimistic lock is performed before business logic access is carried out.
Benefits of technology
It effectively avoids resource waste, reduces pressure on components, achieves better performance, and improves system stability and availability while ensuring data consistency.
✦ Generated by Eureka AI based on patent content.
Abstract
The present invention relates to a high-concurrency transaction locking method and system combining optimistic locks and pessimistic locks, including establishing a distributed pessimistic lock configuration file and judging the enabling status of the distributed pessimistic lock according to the configuration file, adding a distributed pessimistic lock to the transaction request in a timely manner according to the check status, adding an additional distributed pessimistic lock on the basis of the database optimistic lock, and dynamically adjusting the locking time, performing logical control of the pessimistic lock before the business logic access, avoiding waste of resources, reducing the pressure on components, achieving better performance and smaller non-functional system consumption; through the combination of optimistic locks and pessimistic locks, the advantages of both are fully utilized, and the defects of both are avoided, improving the stability and availability of the system while ensuring data consistency.
Need to check novelty before this filing date? Find Prior Art