mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed NPE #200
This commit is contained in:
@@ -395,7 +395,7 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
|
|||||||
// binlog定位位点失败,可能有两个原因:
|
// binlog定位位点失败,可能有两个原因:
|
||||||
// 1. binlog位点被删除
|
// 1. binlog位点被删除
|
||||||
// 2.vip模式的mysql,发生了主备切换,判断一下serverId是否变化,针对这种模式可以发起一次基于时间戳查找合适的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() != null
|
||||||
&& !logPosition.getPostion().getServerId().equals(findServerId(mysqlConnection));
|
&& !logPosition.getPostion().getServerId().equals(findServerId(mysqlConnection));
|
||||||
if (case2) {
|
if (case2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user