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

This commit is contained in:
bucketli
2020-02-27 17:56:10 +08:00
parent 70d8a379f2
commit 7ac605242e
2 changed files with 8 additions and 2 deletions
@@ -934,4 +934,7 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
this.rdsOssMode = rdsOssMode;
}
public void setDumpErrorCount(int dumpErrorCount) {
this.dumpErrorCount = dumpErrorCount;
}
}
@@ -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();
}
});