当前位置:网站首页>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 条记录;如果事务是串行的,则预期的情况是:在一个事务内的第一次、第二次查询应该返回相同的结果集。
边栏推荐
- Easyrecovery15 very easy to use computer data recovery software
- 2020.3.3 notes async/await and promise and Then processes and threads
- 讲座记录《捷联惯导解算的历史及发展》
- Hot and cold, sweet and sour, want to achieve success? Dengkang oral, the parent company of lengsuanling, intends to be listed on the main board of Shenzhen Stock Exchange
- sql_ mode=only_ full_ group_ By's pit
- 关于TCP连接三次握手的详细总结
- NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao
- 什么是持久化?redis 持久化中的RDB和AOF是什么?
- 文本关键词提取:ansj
- Changsha's "talent seeking": "making efforts" and "making practical moves" go hand in hand, "rapid development" and "slow life" go hand in hand
猜你喜欢

Lecture record: new application of inertial navigation - inertial measurement

NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao

5 key indicators of SEO: ranking + traffic + session + length of stay + bounce rate

Acmstreamopen return value problem

Watch out for the stolen face! So many risks of face recognition used every day?

Simple integration of client go gin 11 delete

1280_C语言求两个无符号整形的平均值

Basic use of OBS browser+ browser

navicat可不可以直接操作安卓数据库SQLite

Text keyword extraction: ansj
随机推荐
【LeetCode】143. 重排链表
IntStream API介绍
PHP code audit 1 - php Ini
95% of programmers fish here
GbASE 8s中的Blob 页(Blobspace page)
Win10 environment phpstudy2016 startup failure record
Vigilance against over range collection of privacy - ten mobile app violations
如何筛选出和产品相关的词,精准排除掉无效词
Laravel document sorting 9. Blade template
1280_ C language to find the average value of two unsigned integer
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)
Mathematical analysis_ Notes_ Chapter 3: limits
Laravel document sorting 3. CSRF protection
navicat可不可以直接操作安卓数据库SQLite
GBASE 8s的多线程结构
sql_ mode=only_ full_ group_ By's pit
[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.
Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
A detailed summary of four handshakes (or four waves) over TCP connections
2020.3.3 notes async/await and promise and Then processes and threads