|
@@ -395,7 +395,7 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
|
|
|
// binlog定位位点失败,可能有两个原因:
|
|
|
// 1. binlog位点被删除
|
|
|
// 2.vip模式的mysql,发生了主备切换,判断一下serverId是否变化,针对这种模式可以发起一次基于时间戳查找合适的binlog位点
|
|
|
- boolean case2 = (standbyInfo.getAddress() == null)
|
|
|
+ boolean case2 = (standbyInfo == null || standbyInfo.getAddress() == null)
|
|
|
&& logPosition.getPostion().getServerId() != null
|
|
|
&& !logPosition.getPostion().getServerId().equals(findServerId(mysqlConnection));
|
|
|
if (case2) {
|