当前位置:网站首页>GBASE 8s的并行操作问题场景描述
GBASE 8s的并行操作问题场景描述
2022-06-25 03:59:00 【八珍豆腐】
数据库并行读取数据常见有 3 个问题场景:脏读(Dirty Read)、不可重复读(Non-repeatable Read)和幻影读(Phantom Read)。
1.脏读问题
脏读就是事务 T2 读取到了事务 T1 没有提交的结果,该结果可能会回滚。
举例如下:事务 T1 读取记录,然后更新记录;事务 T2 读取了更新后的记录;事务 T1的后续操作可能失败,导致更新的记录回滚;而同时,事务 T2 使用了一个不准确或者没有提交的值。如果事务是串行的,则预期的情况是:如果 T1 失败,则 T2 将采用更新前的值。
2.不可重复读问题
不可重复读:如果事务 T2 中多个读操作返回不同的结果,则称为不可重复读。
举例如下:事务 T2 读取一个对象;事务 T1 更新同一个对象;事务 T2 再一次读取同一个对象,但是读取到一个修改后的新值;如果事务是串行的,则预期的情况是:如果事务是只读的,则每次读取的结果是一致的。
3.幻影读问题
幻影读:与不可重复读情况类似,事务 T2 在同样的情况下多次执行 SELECT 读取的结果不同。
举例如下:事务 T2 从一个表中检索特定条件的记录返回 m 条记录;事务 T1 往表中insert/delete 其他的满足相同条件的记录;事务 T2 再次以相同的条件检索该表的数据,将返回 <>M 条记录;如果事务是串行的,则预期的情况是:在一个事务内的第一次、第二次查询应该返回相同的结果集。
边栏推荐
- Introduction to intstream API
- Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding
- Mathematical analysis_ Notes_ Chapter 3: limits
- Zoran community
- Finereport displays and hides column data according to conditions
- 【esp32学习之路6——flash加密】
- BSC smart contract dividend mainstream currency | including marketing wallet | deflation | reflow | dividend free token | available for direct deployment
- Musk released humanoid robot. Why is AI significant to musk?
- numpy np tips: numpy数组的squeeze等处理
- 论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)
猜你喜欢
![Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding](/img/ad/69fce7cf064479a0ddd477fb935de2.png)
Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding

Nodejs connects to MySQL through heidisql, and ER appears_ BAD_ DB_ ERROR: Unknown database 'my_ db_ books'

Coinlist how to operate the middle lot number security tutorial
![[openwrt] we recommend a domestically developed version of openwrt, an introduction to istoreos. It is very easy to use. It is mainly optimized. It solves the problem of Sinicization.](/img/62/6152d5a30c92a340cb286c7b1cbc54.png)
[openwrt] we recommend a domestically developed version of openwrt, an introduction to istoreos. It is very easy to use. It is mainly optimized. It solves the problem of Sinicization.

Text keyword extraction: ansj

单元测试覆盖率

UCLA | generative pre training for black box optimization

UCLA | 用于黑盒优化的生成式预训练

95% 程序员都在这里摸鱼……

WMS仓储管理系统的使用价值,你知道多少
随机推荐
DAP data scheduling function improvement description
Error 1062 is reported during MySQL insertion, but I do not have this field.
GbASE 8s中的Blob 页(Blobspace page)
General steps for QT compiling database plug-ins
PostgreSQL数据库WAL——RM_HEAP_ID日志记录动作
Watch out for the stolen face! So many risks of face recognition used every day?
2021.8.29 notes: register, bit operation, pointer, structure
"Renaissance" in the digital age? The bottom digital collection makes people happy and sad
navicat可不可以直接操作安卓数据库SQLite
Flutter Builder & futurebuilder components
sql_ mode=only_ full_ group_ By's pit
1280_ C language to find the average value of two unsigned integer
升级cmake
i. Max development board learning record
Standing wave ratio calculation method
微信小程序父子组件之间传值
Numpy NP tips: squeeze and other processing of numpy arrays
【LeetCode】143. 重排链表
How much do you know about the use value of WMS warehouse management system
Openmmlab environment configuration