当前位置:网站首页>MySQL pessimistic lock
MySQL pessimistic lock
2022-07-25 16:05:00 【Leon_ Jinhai_ Sun】
Pessimistic lock is a kind of thought , seeing the name of a thing one thinks of its function , Is very pessimistic , Be conservative about data being modified by other transactions , It will be realized through the lock mechanism of the database itself , So as to ensure the exclusivity of data operation .
Pessimistic lock always assumes the worst , Every time I go to get the data, I think others will modify it , So every time I get the data, I lock it , So that if people want to take this data, they will Blocking Until it gets the lock ( Shared resources are used by only one thread at a time , Other threads are blocking , Transfer resources to other threads after use ). For example, line locks. , Table lock, etc. , Read the lock , Write locks, etc. , It's all locked before the operation , When other threads want to access data , All need to block pending .Java in synchronized and ReentrantLock Waiting for exclusive lock is the realization of pessimistic lock thought .
边栏推荐
- How to disable hosting when Flink SQL in flink-1.13.6 runs in yarn session mode
- Recursive menu query (recursion: check yourself)
- mysql意向锁
- MySQL教程66-数据表查询语句
- General test case writing specification
- Beyond compare 4 realizes class file comparison [latest]
- MySQL教程71-WHERE 条件查询数据
- Intention lock
- MySQL intent lock
- 30 lines write the concurrency tool class yourself (semaphore, cyclicbarrier, countdownlatch)
猜你喜欢

ML - Speech - traditional speech model

面试8家公司,1周拿了5个offer,分享一下自己的心得

EMQX Cloud 更新:日志分析增加更多参数,监控运维更省心

面试突击:为什么 TCP 需要 3 次握手?

Matlab -- CVX optimization kit installation

推荐收藏,这或许是最全的类别型特征的编码方法总结
![Leetcode:154. find the minimum value II in the rotation sort array [about the middle and rear positioning dichotomy of the rotation sort array]](/img/03/54a2d82a17cd07374dc0aedacd7b11.png)
Leetcode:154. find the minimum value II in the rotation sort array [about the middle and rear positioning dichotomy of the rotation sort array]

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

CircleIndicator组件,使指示器风格更加多样化

Visual studio 2022 view class diagram
随机推荐
Boomi荣获“多元化最佳首席执行官奖”和“职业成长最佳公司奖”,在大型公司类别中跻身50强
How matlab produces random complex sequences
mysql 查看是否锁表
Zhaoqi Kechuang high-quality overseas returnee talent entrepreneurship and innovation service platform, online live broadcast Roadshow
Implementation of recommendation system collaborative filtering in spark
面试突击:为什么 TCP 需要 3 次握手?
权限管理-角色分配菜单
MySQL self incrementing lock
High score technical document sharing of ink Sky Wheel - Database Security (48 in total)
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
报表工具的二次革命
Reasons for data format conversion when matlab reads the displayed image
ServletConfig 类和ServletContext 类
Data system partition design - partition and secondary index
General test case writing specification
Wavelet transform --dwt2 and wavedec2
The second revolution of reporting tools
Sword finger offer | number of 1 in binary
MySQL intent lock
Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)