当前位置:网站首页>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 条记录;如果事务是串行的,则预期的情况是:在一个事务内的第一次、第二次查询应该返回相同的结果集。
边栏推荐
- acmStreamOpen返回值问题
- Retrofit source code analysis
- Is opencv open source?
- LeetCode 劍指Offer II 091 粉刷房子[動態規劃] HERODING的LeetCode之路
- 如何筛选出和产品相关的词,精准排除掉无效词
- 2021.8.29 notes: register, bit operation, pointer, structure
- 文本关键词提取:ansj
- DAP data scheduling function improvement description
- kenlm
- Should I use on or where for the left join
猜你喜欢

警惕超范围采集隐私-移动APP违规十宗罪

Numpy NP tips: use OpenCV to interpolate and zoom the array to a fixed shape cv2 resize(res, dsize=(64, 64), interpolation=cv2. INTER_ CUBIC)

Office macro virus bounce shell experiment

Finereport displays and hides column data according to conditions

Laravel document sorting 4. Controller

Can Navicat directly operate the Android database SQLite

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

简单的恶意样本行文分析-入门篇

无法安装redis接口

1280_C语言求两个无符号整形的平均值
随机推荐
UCLA | 用于黑盒优化的生成式预训练
Laravel document sorting 1. Installation and Preliminary Configuration
简单的恶意样本行文分析-入门篇
Introduction to intstream API
Numpy NP tips: squeeze and other processing of numpy arrays
A-table mouse over the display hand, the current line can be clicked
Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)
Value transfer between parent and child components of wechat applet
Doubts about judging the tinyint field type of MySQL
数字时代的“文艺复兴”?起底数字藏品,让人欢喜让人愁
Exercise: how difficult is it to simulate the blessing lottery two-color ball - China 500W grand prize? Just run the code.
How to screen out words related to products and eliminate invalid words accurately
Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
Simple integration of client go gin 11 delete
Synchronous and asynchronous functions (callback function, promise, generator, async/await)
Error 1062 is reported during MySQL insertion, but I do not have this field.
MySQL order by
IntStream API介绍
[kubernetes series] installation and use of Helm
讲座记录《捷联惯导解算的历史及发展》