当前位置:网站首页>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 )
边栏推荐
- MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server
- 阿里云有奖体验:用PolarDB-X搭建一个高可用系统
- Emotional analysis of wechat chat records on Valentine's day based on Text Mining
- Xlrd common operations
- 如何向mongoDB中添加新的字段附代码(全)
- 如何组织一场实战攻防演练
- Codeforces 12D Ball 树形阵列模拟3排序元素
- Installation of VMware Workstation
- Hysbz 2243 staining (tree chain splitting)
- HYSBZ 2243 染色 (树链拆分)
猜你喜欢

MMAP learning

Type of fault

"Chris Richardson microservices series" uses API gateway to build microservices

力扣------经营摩天轮的最大利润

Alibaba cloud award winning experience: build a highly available system with polardb-x

MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server

Emotional analysis of wechat chat records on Valentine's day based on Text Mining

EBS Oracle 11g 克隆步骤(单节点)

Xlrd common operations

阿里云有奖体验:用PolarDB-X搭建一个高可用系统
随机推荐
资深电感厂家告诉你电感什么情况会有噪音电感噪音是比较常见的一种电感故障情况,如果使用的电感出现了噪音大家也不用着急,只需要准确查找分析出什么何原因,其实还是有具体的方法来解决的。作为一家拥有18年品牌
力扣------经营摩天轮的最大利润
Advantages of robot framework
Daily question brushing record (XIV)
Cold violence -- another perspective of objective function setting
Emotional analysis of wechat chat records on Valentine's day based on Text Mining
Analysis and test of ModbusRTU communication protocol
多家呼吸机巨头产品近期被一级召回 呼吸机市场仍在增量竞争
2.2 basic grammar of R language
2.2.5 basic sentences of R language drawing
Codeforces 12D ball tree array simulation 3 sorting elements
MMAP
MMAP学习
Gcc9.5 offline installation
Regular expressions and re Libraries
MySQL disconnection reports an error MySQL ldb_ exceptions. OperationalError 4031, The client was disconnected by the server
Type of fault
Zhang Lijun: penetrating uncertainty depends on four "invariants"
Four components of logger
Interprocess communication in the "Chris Richardson microservice series" microservice architecture