pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
424 stars 282 forks source link

TiCDC OOM due to match prewrite-commit during large txn #9654

Open overvenus opened 1 year ago

overvenus commented 1 year ago

What did you do?

Cluster:

Run a large txn in upstream.

$ sysbench --db-driver=mysql --mysql-host=10.2.12.11 --mysql-port=31030 --mysql-user=root \
        --mysql-db=test --tables=1 --table-size=100000000 --create_secondary=false \
        oltp_update_index prepare

mysql > SET GLOBAL tidb_server_memory_limit = "32GB";
mysql > SET tidb_mem_quota_query = 8 << 32; update test.sbtest1 set c='a';

image

OOM is caused by the matcher in kv client. TiCDC should forward change events to sorter directly and match prewrite-commit in sorter.

What did you expect to see?

TiCDC does not OOM.

What did you see instead?

TiCDC OOM.

Versions of the cluster

Upstream TiKV version (execute tikv-server --version):

v7.4.0-alpha with patches that does not OOM during large txn. See https://github.com/tikv/tikv/issues/15412

TiCDC version (execute cdc version):

v7.4.0-alpha

fubinzh commented 1 year ago

/severity major

flowbehappy commented 5 months ago

It is a design limitation. So should be labled as enhancement.