-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-cluster12' into 'master' (merge request !328)
fix migrate snapshot timeout bug#101 ### MR描述 搬迁过程中线程调度分配问题 或者是binlog接收时候会导致没sender线程发送的问题。 发送端线程池需要做完send Snapshot+ send binlog 而接收端线程池只做 receive snapshot ,binlog走的是session执行命令,这两个线程的执行时间通常有几秒的误差,导致了任务调度时,receiver调度更快这样可能会触发snapshot接收超时的bug ### 修改动机和上下文背景 上下文参考 #101 思路1:让接受端线程池 调度时考虑到正在接受binlog的任务,如果有接受binlog的任务暂时延迟 思路2: 交给recever接收端去决定重试和调度,当receiver 发送readymigrate命令给sender时,判断线程池是不是满了,如果满了,sender就不去发数据(改为waiting状态 然后100毫秒后再次调度),也就是是sender不会出于在线程池排队的状态(这个状态会导致超时的bug) ### 此MR如何进行测试 ? cluster_test 增加了测例migrateChangeThread ### change 类型 <!---你的代码引入了何种类型的change, 在所有关联的复选框前选择"x" --> - [ ] Bug fix (修复了issue的非侵入式修改) - [ ] New feature (增加功能的非侵入式修改) - [ ] Breaking change (修复或者增加特性, 但是会造成现有行为的非预期行为) ### 清单 <!--- 查看下述选项,并进行"x"勾选 --> <!--- 如果你对所有都不确定, 请随时咨询我们 --> - [ ] 遵循项目的Code-Style - [ ] Change 需要文档的修改 - [ ] 我已经进行相关文档的修改 - [ ] 我的MR已经通过的相关流水线测试
- Loading branch information
Showing
8 changed files
with
187 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters