fix(canal):fix endless local binlog mode with exception. (#2597)

This commit is contained in:
Li Qiang
2020-02-28 10:48:54 +08:00
committed by GitHub
parent 70d8a379f2
commit a71375dad5
2 changed files with 8 additions and 2 deletions

View File

@@ -934,4 +934,7 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
this.rdsOssMode = rdsOssMode;
}
public void setDumpErrorCount(int dumpErrorCount) {
this.dumpErrorCount = dumpErrorCount;
}
}

View File

@@ -88,6 +88,9 @@ public class RdsBinlogEventParserProxy extends MysqlEventParser {
@Override
public void run() {
rdsLocalBinlogEventParser.stop();
// empty the dump error count,or will go into local binlog mode again,with error
// position,never get out,fixed by bucketli
RdsBinlogEventParserProxy.this.setDumpErrorCount(0);
RdsBinlogEventParserProxy.this.start();
}
});