当前位置:网站首页>Stop slave is stuck -- the event of the transaction is not copied completely
Stop slave is stuck -- the event of the transaction is not copied completely
2022-07-02 22:55:00 【Xiangyun 123456】
In the article stop slave Get stuck , A preliminary introduction to stop slave And some reasons .
And articles stop slave Stuck simulation – Big business scenario in , Introduced the large transaction scenario ,stop slave The simulation .
This article introduces another case : The events of a transaction are not completely copied to the slave database .
In the master-slave architecture , After updating the data on the main database , Will write binlog, And copy to the slave Library .
In transactional storage engines , Such as innoDB, Data updates are in transactions .
A transaction usually has many event form , for example begin, commit,query, write_rows wait .
Commit a transaction on the master database , Event write binlog, Then copy to the slave Library , Start playback from the Library binlog. Playback from the library binlog, Not all of a transaction event After copying them , Just started playback , But one side I/O Thread receive binlog journal , On one side SQL Thread application binlog journal .
such , There may be a problem , If a transaction event More , Only a part event Copy to from library , At this time, the main library fails or The network is disconnected , The remaining... Cannot be received from the library event, Lead to SQL The thread has been waiting for the rest event.
At this time , Execute... On the slave library stop slave,SQL Thread will wait , Until the waiting time is exceeded ( Default 60s), Then roll back the transaction .
Basic troubleshooting ideas :
- Check the major tasks being implemented event( Big business monitoring in advance , You can collect what is being executed event).
- View the error log from the Library , Determine the log location of the master database that is being copied from the slave database . Use this log point , In the old main warehouse binlog Find the corresponding event in .
- The analysis reason :
- If what is being executed is begin event , And the event corresponding to the replication site from the library is not commit, Then we can get , Lead to stop slave The reason for the timeout is that the event of the transaction is not received completely .
- Ongoing SQL yes Normal update SQL, Lead to stop slave The reason for the timeout may be that the transaction is relatively large , The actual implementation is time-consuming , It may also be that the event is not received completely ( Because it is impossible to determine whether the executing transaction and the replicating transaction are the same ).
边栏推荐
- Rails 3 activerecord: sort by association count - rails 3 activerecord: order by count on Association
- 牛客网:龙与地下城游戏
- 图形视图框架
- Radis:Linux上安装Redis(步骤)
- uniapp微信登录返显用户名和头像
- What is the'function'keyword used in some bash scripts- What is the 'function' keyword used in some bash scripts?
- Jatpack------LiveData
- 附加:【登录信息存储】与【登录状态校验】;(包括:总结了到目前为止,有关【登录信息存储】与【登录状态校验】的所有内容;)
- 位的高阶运算
- Higher order operation of bits
猜你喜欢
![P7072 [CSP-J2020] 直播获奖](/img/bc/fcbc2b1b9595a3bd31d8577aba9b8b.png)
P7072 [CSP-J2020] 直播获奖

kubernetes 使用主机名将 pod 分配在指定节点上

Oracle-游标
![[chestnut sugar GIS] ArcMap - how to batch modify the font, color, size, etc. of annotation elements](/img/b1/1fae909fb6a9231096a93d741d6426.png)
[chestnut sugar GIS] ArcMap - how to batch modify the font, color, size, etc. of annotation elements

NC50965 Largest Rectangle in a Histogram

数学建模——图与网络模型及方法(一)

LeetCode 968. 监控二叉树

Higher order operation of bits

Wait to solve the zombie process

Baidu AI Cloud - create a face recognition application
随机推荐
Baidu AI Cloud - create a face recognition application
U++ learning note pile
Notes on key vocabulary in the English original of the biography of jobs (10) [chapter eight]
Golang's learning route
Qt QSplitter拆分器
全面解析分享购商业模式逻辑?分享购是如何赋能企业
go 多线程数据搜索
佩服,竟然有人把高等数学这么晦涩难懂的科目,讲解得如此通俗易懂
Qt QScrollArea
Wait to solve the zombie process
go 条件变量
Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
存储单位换算
I admire that someone explained such an obscure subject as advanced mathematics so easily
Jerry's charge unplugged, unable to touch the boot [chapter]
wait解决僵尸进程
Comprehensively analyze the logic of the shared purchase business model? How sharing purchase empowers Enterprises
【板栗糖GIS】global mapper 如何通过dsm批量制作贴地等高线
Unity publishes a method of webgl playing sound
WebRTC音视频采集和播放示例及MediaStream媒体流解析