Skip to content

Commit

Permalink
表格展示格式修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mythyygg authored Mar 19, 2019
1 parent 1676796 commit a15ffac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CaseStudy/排查案例/记一次神奇的Mysql死锁排查.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ UPDATE tenant_config SET
上面我们说有三个事务进入update语句为了简化说明这里我们只需要两个事务同时进入update语句即可下面的表格展示了我们整个的发生过程:

时间线 | 事务1 | 事务2 | 事务3
---|--- |---|---|---
---|--- |---|---
1 | insert into xx | insert into xx | insert into xx
2 | 获取当前行X锁| |
3 | | 需要检测唯一索引是否冲突获取S锁阻塞| 需要检测唯一索引是否冲突获取S锁阻塞
3 | | 需要检测唯一索引是否冲突获取S锁阻塞|需要检测唯一索引是否冲突获取S锁阻塞
4 | commit;| 获取到到S锁|获取到S锁
5 | | 发现唯一索引冲突执行Update语句(此时S锁未释放)|发现唯一索引冲突执行Update语句
6 | | 获取该行的X锁被事务3的S锁阻塞|获取该行的X锁被事务2的S锁阻塞
Expand Down

0 comments on commit a15ffac

Please sign in to comment.