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

修复rename table命令中包含多个表,解析失败问题 #122

Merged
merged 2 commits into from
Jul 17, 2015

Conversation

likeloveluck
Copy link
Contributor

简单的修复下 rename table命令中包含多个表的问题。

#79 中提到的:
后续完美解决:使用类似druid/cobar的mysql sql语法解析,提取对应的表.
是比较理想解决方案。

由于canal获取binlog存在延迟,可能拿到binlog的时候通过desc命令获取的表结构实际是和binlog产生时的表结构有差距的。

最好的解决方案是ddl语句都直接触发tablemeta cache的对应变化,而不是clear tablemetacache。

1.只有drop table 会clear tablemeta cache
2.只有收集到table metacache 中没有的表的binlog时才会desc 获取表结构。
3.ddl语句都直接作用在tablemeta cache上

这个才能最大程度的减少错误的发生,这个是个临时的修补方案,解决目前遇到的 rename table命令中包含多个表的问题。

agapple added a commit that referenced this pull request Jul 17, 2015
修复rename table命令中包含多个表,解析失败问题
@agapple agapple merged commit 10930b9 into alibaba:master Jul 17, 2015
LieLieLiekey pushed a commit to LieLieLiekey/canal that referenced this pull request May 24, 2023
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.

2 participants