当前位置:网站首页>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
边栏推荐
- The automatic control system of pump station has powerful functions and diverse application scenarios
- Will the memory of ParticleSystem be affected by maxparticles
- Global and Chinese market of box seals 2022-2028: Research Report on technology, participants, trends, market size and share
- G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
- Setting function of Jerry's watch management device [chapter]
- Life cycle of instance variables, static variables and local variables
- Latex tips slash \backslash
- Question C: Huffman tree
- In yolov5, denselayer is used to replace focus, and the FPN structure is changed to bi FPN
- Conditional statements of shell programming
猜你喜欢
![Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine](/img/3a/cf6285ae1c01bda42874eeca9fe5b1.jpg)
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine

MySQL advanced SQL statement (1)

3D game modeling is in full swing. Are you still confused about the future?

How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #

Feign implements dynamic URL

MySQL advanced (Advanced) SQL statement (I)

Final consistency of MESI cache in CPU -- why does CPU need cache
![[software implementation series] software implementation interview questions with SQL joint query diagram](/img/8b/8718fea82f83a6169ea5d8c2e5b645.jpg)
[software implementation series] software implementation interview questions with SQL joint query diagram

Buuctf QR code

FRP intranet penetration
随机推荐
Format character%* s
How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #
Gee import SHP data - crop image
Crawler practice website image batch download
Advanced learning of MySQL -- Application -- index
13. Time conversion function
在尋求人類智能AI的過程中,Meta將賭注押向了自監督學習
2022 electrician (elementary) examination question bank and electrician (elementary) simulation examination question bank
LV1 Roche limit
G3 boiler water treatment registration examination and G3 boiler water treatment theory examination in 2022
Basic editing specifications and variables of shell script
60 year old people buy medical insurance and recommend a better product
Conditional statements of shell programming
A fan summed up so many interview questions for you. There is always one you need!
Chinese Mitten Crab - current market situation and future development trend
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
Hunan University | robust Multi-Agent Reinforcement Learning in noisy environment
The difference between lambda expressions and anonymous inner classes
Take you to master the formatter of visual studio code
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?