yangjie397 commented on issue #8815:
URL: https://github.com/apache/seatunnel/issues/8815#issuecomment-3631197189
我也遇到相同的问题了,是在删除数据的时候遇到的,我在TiDB弄了一张最简单的表,如下:
CREATE TABLE IF NOT EXISTS `abcd`
(
`fld_guid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT
NULL comment '主键',
PRIMARY KEY(`fld_guid`)
) comment '批量事件-导入模板-欠费';
然后插入两条数据:
INSERT INTO `abcd` (`fld_guid`)
VALUES('0000137c-2e9a-4ed3-92e7-d9cc7e0267f2');
INSERT INTO `abcd` (`fld_guid`)
VALUES('0000204f-6b6f-44b3-bbe6-97c095cbbb01');
步骤:
1,启动seatunnel,两条数据正常同步到Doris数据库
2,在TiDB执行 delete from abcd; 删除数据
3,在Doris只有一条数据被删除,实际应该两条都删除
结论:部分ID在目标数据源会遇到删除不了的问题,大部分ID是可以的
seatunnel的配置:
env {
parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 2000
}
source {
TiDB-CDC {
plugin_output = "abcd"
url = "jdbc:mysql://192.168.1.7:4000/local1"
driver = "com.mysql.cj.jdbc.Driver"
tikv.grpc.timeout_in_ms = 20000
pd-addresses = "192.168.1.5:2379"
username = "xxxx"
password = "xxxxx"
database-name = "test"
table-name = "abcd"
batch-size-per-scan = "5000"
}
}
sink {
Doris {
plugin_input = "abcd"
fenodes = "192.168.1.7:8030"
username = "xxxx"
password = "xxxx"
database = "test"
sink.enable-2pc = "true"
sink.enable-delete = "true"
sink.label-prefix = "abcd_prefix"
doris.config = {
line_delimiter = "&&@&&"
format="json"
read_json_by_line="true"
}
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]