当前位置:网站首页>Blocking of concurrency control
Blocking of concurrency control
2022-07-05 21:59:00 【Short section senior】
What is blockade
Blockade is business T On a data object ( Such as table 、 Records, etc. ) Before the operation , Make a request to the system first , Lock it
After lock transaction T It has certain control over the data object , In the transaction T Before releasing its lock , Other transactions cannot update this data object .
Blocking is a very important technology to realize concurrency control
Basic blockade types
What kind of control a transaction has after locking a data object is determined by the type of blocking .
Basic blockade types
Exclusive lock (Exclusive Locks, Short for X lock )
Exclusive lock is also called write lock
If business T For data objects A add X lock , Only T Read and modify A, Nothing else can be done to A Add any type of lock , until T Release A The lock on the
Make sure other things are in T Release A The lock on can't be read or modified before A
Shared lock (Share Locks, Short for S lock )
Shared locks are also called read locks
If business T For data objects A add S lock , The transaction T You can read A But it can't be modified A, Other things can only be done to A Add S lock , Instead of X lock , until T Release A Upper S lock
Make sure other transactions are readable A, But in T Release A Upper S You can't do it before you lock it A Make any changes
Compatibility matrix of lock
Y=Yes, Compatible requests
N=No, Incompatible requests
In the compatibility matrix of locks :
The leftmost column represents transactions T1 The type of lock on the acquired data object , The horizontal line indicates that it is not locked .
The top line represents another transaction T2 Blocking request for the same data object .
T2 Whether the blocking request can be satisfied is used in the matrix Y and N Express
Y Presentation transaction T2 The blockade requirements and T1 Lock held , The blocking request can satisfy
N Express T2 Your blocking request is related to T1 Lock already held conflicts ,T2 's request was rejected
Welcome to join me for wechat exchange and discussion ( Please note csdn Add )
边栏推荐
- Xlrd common operations
- 微服務鏈路風險分析
- Microservice link risk analysis
- Regular expressions and re Libraries
- Kingbasees v8r3 data security case - audit record clearing case
- Decorator learning 01
- Ad637 notes d'utilisation
- The American Championship is about to start. Are you ready?
- 华为快游戏调用登录接口失败,返回错误码 -1
- 资深电感厂家告诉你电感什么情况会有噪音电感噪音是比较常见的一种电感故障情况,如果使用的电感出现了噪音大家也不用着急,只需要准确查找分析出什么何原因,其实还是有具体的方法来解决的。作为一家拥有18年品牌
猜你喜欢
使用Aspect制作全局异常处理类
MMAP
Incentive mechanism of Ethereum eth
2.2.5 basic sentences of R language drawing
Installation of VMware Workstation
Implementation technology of recovery
DBeaver同时执行多条insert into报错处理
怎么利用Tensorflow2进行猫狗分类识别
力扣------经营摩天轮的最大利润
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
随机推荐
力扣------经营摩天轮的最大利润
Bitbucket installation configuration
华为联机对战如何提升玩家匹配成功几率
ICMP introduction
ICMP 介绍
How to add new fields to mongodb with code (all)
华为云ModelArts文本分类–外卖评论
从零开始实现lmax-Disruptor队列(四)多线程生产者MultiProducerSequencer原理解析
Defect detection - Halcon surface scratch detection
Summary of data analysis steps
Environment configuration problem record
Overview of database recovery
华为快游戏调用登录接口失败,返回错误码 -1
Huawei cloud modelarts text classification - takeout comments
Oracle checkpoint queue - Analysis of the principle of instance crash recovery
递归查询多级菜单数据
Microservice link risk analysis
QML reported an error expected token ";", expected a qualified name ID
Oracle检查点队列–实例崩溃恢复原理剖析
regular expression