alibaba / canal

阿里巴巴 MySQL binlog 增量订阅&消费组件
Apache License 2.0
28.38k stars 7.59k forks source link

canal-adapter-1.1.5 手动etl报死锁问题 #4022

Open wplus3 opened 2 years ago

wplus3 commented 2 years ago

手动elt {"succeeded":false,"resultMessage":"导入RDB 数据:20000 条","errorMessage":"xxxx etl failed! ==>Deadlock found when trying to get lock; try restarting transaction\xxxxxx etl failed! ==>Deadlock found when trying to get lock; try restarting transaction"}% 求解???????

wplus3 commented 2 years ago

我看了下源码,只有在数据大于10000的时候,多线程处理会出现这个死锁问题,有没有人解决下啊?????? rdb,mysql,数据库隔离级别是rr情况下会出现

743102882 commented 2 years ago

您的邮件我已收到,非常感谢,以后常联系!

jeeinn commented 2 years ago

隔离级别调整为RC,也还是有同样的问题

{"succeeded":false,"resultMessage":"导入RDB 数据:1671930 条","errorMessage":"user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction
user_logs etl failed! ==>Deadlock found when trying to get lock; try restarting transaction"}
curl: (6) Could not resolve host: params=20220101
wplus3 commented 2 years ago

隔离级别调整为RC没问题的,你应该是设置RC没生效

jeeinn commented 2 years ago

我的问题感觉和这个说法一致: https://github.com/alibaba/canal/issues/2060#issuecomment-559060341 因为同步结束后,我核实了两个表的数据条数是一致的。虽然报错了,但是数据导入成功了。