mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Updated FAQ (markdown)
4
FAQ.md
4
FAQ.md
@@ -3,7 +3,7 @@
|
|||||||
答1:
|
答1:
|
||||||
出现这类情况主要原因为收到的binlog就为Query事件,比如:
|
出现这类情况主要原因为收到的binlog就为Query事件,比如:
|
||||||
1. binlog格式为非row模式,通过show variables like 'binlog\_format'可以查看. 针对statement/mixed模式,DML语句都会是以SQL语句存在
|
1. binlog格式为非row模式,通过show variables like 'binlog\_format'可以查看. 针对statement/mixed模式,DML语句都会是以SQL语句存在
|
||||||
2. mysql5.6+之后,在binlog为row模式下,针对DML语句通过一个开关(binlog-rows-query-log-events=true),记录DML的原始SQL,对应binlog事件为RowsQueryLogEvent,同时也有对应的row记录. ps. canal可以通过properties设置来过滤:canal.instance.filter.query.dml = true
|
2. mysql5.6+之后,在binlog为row模式下,针对DML语句通过一个开关(binlog-rows-query-log-events=true, show variables里也可以看到该变量),记录DML的原始SQL,对应binlog事件为RowsQueryLogEvent,同时也有对应的row记录. ps. canal可以通过properties设置来过滤:canal.instance.filter.query.dml = true
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
```
|
```
|
||||||
2. 检查binlog格式,过滤条件只针对row模式的数据有效(ps. mixed/statement因为不解析sql,所以无法准确提取tableName进行过滤)
|
2. 检查binlog格式,过滤条件只针对row模式的数据有效(ps. mixed/statement因为不解析sql,所以无法准确提取tableName进行过滤)
|
||||||
3. 检查下CanalConnector是否调用subscribe(filter)方法;有的话,filter需要和instance.properties的canal.instance.filter.regex一致,否则subscribe的filter会覆盖instance的配置,如果subscribe的filter是.\*\\..\*,那么相当于你消费了所有的更新数据 <span data-type="color" style="color:#F5222D">【特别注意】</span>
|
3. 检查下CanalConnector是否调用subscribe(filter)方法;有的话,filter需要和instance.properties的canal.instance.filter.regex一致,否则subscribe的filter会覆盖instance的配置,如果subscribe的filter是.\*\\..\*,那么相当于你消费了所有的更新数据 <span data-type="color" style="color:#F5222D">【特别注意】</span>
|
||||||
4. canal 1.1.3+版本之后,会在日志里记录最后使用的filter条件
|
4. canal 1.1.3+版本之后,会在日志里记录最后使用的filter条件,可以对比使用的filter看看是否和自己期望的是一致,如果不一致检查一下第3步
|
||||||
```plain
|
```plain
|
||||||
c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$
|
c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$
|
||||||
c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter :
|
c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter :
|
||||||
|
|||||||
Reference in New Issue
Block a user