【背景】
将TiDB某库中部分表的binlog同步至下游Kafka。配置文件如下:
case-sensitive = true
enable-old-value = true
[filter]
rules = ['workorder_index.workorder', 'workorder_index.workflow', 'workorder_index.workflow_reply']
[mounter]
worker-num = 16
[sink]
dispatchers = [
{matcher = ['workorder_index.*'], dispatcher = "rowid"}
]
protocol = "canal-json"
[cyclic-replication]
enable = false
启动命令:
tiup ctl cdc changefeed create \
--pd=http://[PD_IP]:2379 \
--sink-uri="kafka://[KAFKA_IP]:9092/ticdc_canal_workorder_index?kafka-version=2.2.1&partition-num=20&replication-factor=3&protocol=canal-json&max-message-bytes=10485760" \
--changefeed-id="workorder-index" \
--config cdc_workorder_index.toml
【问题】
Binlog能够正常同步,但持续出现以下报警,从任务启动后未停止过。
[1] Firing
Labels
alertname = ticdc_mounter_unmarshal_and_mount_time_more_than_1s
capture = [CDC_IP]:8300
changefeed = workorder-index
cluster = sht-tidb-cluster-pro
env = ENV_LABELS_ENV
expr = histogram_quantile(0.9, rate(ticdc_mounter_unmarshal_and_mount_bucket[1m])) * 1000 > 1000
instance = [CDC_IP]:8300
job = ticdc
level = warning
monitor = prometheus
Annotations
description = cluster: ENV_LABELS_ENV, instance: [CDC_IP]:8300, values: 4600
summary = cdc_mounter unmarshal and mount time more than 1s
value = 4600
集群中有3个TiCDC实例,启动了3个CDC任务,其他两个任务都正常,且出现问题的这个任务数据量是最小的。
【TiDB 版本】
4.0.10
【附件】
Grafana监控图表: