问题:如果修改数据库某张表的某个字段时出现如下日志:
2024-06-04 15:32:18.177 [pool-2-thread-1] DEBUG c.a.o.canal.client.adapter.es.core.service.ESSyncService - DML: {"data":null,"database":"aws","destination":"CANAL_GOODS","es":1717486338000,"groupId":"g1","isDdl":false,"old":null,"pkNames":null,"sql":"/* ApplicationName=DataGrip 2023.1.2 */ UPDATE aws.t_aws_account t SET t.base_account_no = 21739923669811712 WHERE t.account_no = 273366981196800","table":"t_aws_account","ts":1717486338173,"type":"UPDATE"}
Affected indexes: aws_account_dev
从日志中看到old属性为null,说明没有获取到源数据信息,从而修改无效无法同步修改后的数据到ES中。解决此问题需要做如下设置
设置源数据库MySql的my.cnf的binlog配置。把两个关键的参数做如下设置
binlog_format = ROW
binlog_row_image = FULL
使云数据库修改后立即生效,其他模式可能需要重启
标签:ES6,account,同步,binlog,数据库,aws,修改,null,adapter1.1 From: https://www.cnblogs.com/gzling/p/18231281/adapter-115-cannot-synchronize-data-to-es6-sqww7