当前位置:网站首页>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
边栏推荐
- [untitled] the relationship between the metauniverse and digital collections
- A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China
- String & memory function (detailed explanation)
- Jerry's modification setting status [chapter]
- 15. System limitations and options
- When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
- [software implementation series] software implementation interview questions with SQL joint query diagram
- Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
- The automatic control system of pump station has powerful functions and diverse application scenarios
- Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
Final consistency of MESI cache in CPU -- why does CPU need cache
Jerry's modification setting status [chapter]
On Valentine's day, I code a programmer's exclusive Bing Dwen Dwen (including the source code for free)
JVM performance tuning and practical basic theory - medium
Feign implements dynamic URL
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
3D game modeling is in full swing. Are you still confused about the future?
Save Private Ryan - map building + voltage dp+deque+ shortest circuit
Yyds dry goods inventory it's not easy to say I love you | use the minimum web API to upload files
A fan summed up so many interview questions for you. There is always one you need!
随机推荐
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
I don't know why it can't run in the project and how to change it
C language black Technology: Archimedes spiral! Novel, interesting, advanced~
Design and implementation of redis 7.0 multi part AOF
MySQL advanced (Advanced) SQL statement (I)
STM32 key content
Kiss number + close contact problem
C # learning notes: structure of CS documents
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
Portable two-way radio equipment - current market situation and future development trend
The requests module uses
FRP intranet penetration
LV1 Roche limit
Neo4j learning notes
Magical usage of edge browser (highly recommended by program ape and student party)
Conditional statements of shell programming
Why can't it run (unresolved)
1189. Maximum number of "balloons"
A. Min Max Swap
[typora installation package] old typera installation package, free version