mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
filter dml before apply to tsdb
This commit is contained in:
@@ -260,7 +260,9 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!isSeek) {
|
||||
boolean isDml = (type == EventType.INSERT || type == EventType.UPDATE || type == EventType.DELETE);
|
||||
|
||||
if (!isSeek && !isDml) {
|
||||
// 使用新的表结构元数据管理方式
|
||||
EntryPosition position = createPosition(event.getHeader());
|
||||
tableMetaCache.apply(position, event.getDbName(), queryString, null);
|
||||
@@ -268,8 +270,7 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
|
||||
|
||||
Header header = createHeader(event.getHeader(), schemaName, tableName, type);
|
||||
RowChange.Builder rowChangeBuider = RowChange.newBuilder();
|
||||
if (type != EventType.QUERY && type != EventType.INSERT && type != EventType.UPDATE
|
||||
&& type != EventType.DELETE) {
|
||||
if (type != EventType.QUERY && !isDml) {
|
||||
rowChangeBuider.setIsDdl(true);
|
||||
}
|
||||
rowChangeBuider.setSql(queryString);
|
||||
|
||||
Reference in New Issue
Block a user