Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-osc-lock-cannot-kill #213

Closed
wants to merge 3 commits into from
Closed

fix-osc-lock-cannot-kill #213

wants to merge 3 commits into from

Conversation

soul-F
Copy link
Contributor

@soul-F soul-F commented May 15, 2020

pt-online-schema-change 修改表结构,遇到 Waiting FOR TABLE metadata LOCK;时,下发 kill 命令,会导致,程序一直卡在读输出流,无法走到 if p.Killed ,导致kill 语句不成功。

@hanchuanchuan
Copy link
Owner

周末我会测试重现一下该问题, 后续确定修复方案.

@jianhaiqing
Copy link
Contributor

jianhaiqing commented May 16, 2020

关于这个问题,韩老板是否考虑加上超时时间
--set-vars lock_wait_timeout=3,innodb_lock_wait_timeout=1
当前假如有未提交的事务,或者某些业务的只读(select也开事务)时间很长,就可以避免在 rename table 或 create trigger 的时候,不会让业务卡死;

当前gh-ost 在rename table 的时候,会lock_wait_timeout=3,并retry 3次;

相关ISSUE

@hanchuanchuan
Copy link
Owner

该BUG确实是存在的, 建议调整为channel来处理KILL操作.

@soul-F
Copy link
Contributor Author

soul-F commented May 18, 2020

该BUG确实是存在的, 建议调整为channel来处理KILL操作.

不知道有没有更优雅的处理方法,感觉channel处理的有点乱。

@soul-F
Copy link
Contributor Author

soul-F commented May 18, 2020

我看已经修复了

@soul-F soul-F closed this May 18, 2020
@hanchuanchuan
Copy link
Owner

我做了一下实现, 不过没有合并PR, 感兴趣的话可以尝试一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants