当前位置:网站首页>Redis transaction
Redis transaction
2022-07-04 02:21:00 【Drgom】
redis Business Complete... Is not supported acid Mechanism ,redis The process of transaction is divided into team formation and execution , An error occurred in a command in the process of forming a team , Then all errors are reported , An error occurred during execution , Still carry on , In addition to executing failed commands , Carry on , No, Transaction isolation level The concept of
Locking mechanism
Here is to redis Based on a single server , Lock is divided into optimistic lock and pessimistic lock
Optimism lock
Optimistic locks are distinguished by version numbers ,redis Transaction monitoring key, If I found key The version number before and after changes , Then the transaction execution fails , and redis The lock of a transaction is an optimistic lock
Pessimistic locking
Nothing to say. , Total occlusion , Native redis Can't achieve
Monitor one at a time key, Open two transactions , When the transaction is executed key Version number of changed , Then the transaction execution fails
Defects of two locking mechanisms
Optimism lock : In a highly concurrent environment , It will lead to inventory problems ( Because of the high concurrency key The version of is modified by multiple transactions , Therefore, the competition will lead to the failure of transaction execution )
Pessimistic locking : Insufficient concurrency
边栏推荐
- Career development direction
- Create real-time video chat in unity3d
- 2022 R2 mobile pressure vessel filling certificate examination and R2 mobile pressure vessel filling simulation examination questions
- JVM performance tuning and practical basic theory - medium
- Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization
- Day05 branch and loop (II)
- Setting function of Jerry's watch management device [chapter]
- How to view the computing power of GPU?
- 60 year old people buy medical insurance and recommend a better product
- Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
猜你喜欢
Example 072 calculation of salary it is known that the base salary of an employee of a company is 500 yuan. The amount of software sold by the employee and the Commission method are as follows: Sales
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
Ai aide à la recherche de plagiat dans le design artistique! L'équipe du professeur Liu Fang a été embauchée par ACM mm, une conférence multimédia de haut niveau.
LV1 tire pressure monitoring
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Buuctf QR code
Gee import SHP data - crop image
Learn these super practical Google browser skills, girls casually flirt
The reasons why QT fails to connect to the database and common solutions
Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization
随机推荐
Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
What are the conditions for the opening of Tiktok live broadcast preview?
Properties of binary trees (numerical aspects)
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
From the 18th line to the first line, the new story of the network security industry
JVM performance tuning and practical basic theory - medium
When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
13. Time conversion function
Example 073 square sum value judgment programming requires the input of a and B, if a ²+ b ² If the result of is greater than 100, a is output ²+ b ² Value, otherwise output the result of a + B.
Example 072 calculation of salary it is known that the base salary of an employee of a company is 500 yuan. The amount of software sold by the employee and the Commission method are as follows: Sales
Write the first CUDA program
在尋求人類智能AI的過程中,Meta將賭注押向了自監督學習
The automatic control system of pump station has powerful functions and diverse application scenarios
Remember another interview trip to Ali, which ends on three sides
[typora installation package] old typera installation package, free version
Mysql-15 aggregate function
Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
Gee import SHP data - crop image
Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share