tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

TiCDC OOM due to match prewrite-commit during large txn

Open overvenus opened this issue 1 year ago • 2 comments

What did you do?

Cluster:

  • tikv 4 nodes, 16GB memory
  • ticdc 1 node, 32GB memory

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

overvenus avatar Aug 29 '23 06:08 overvenus

/severity major

fubinzh avatar Sep 04 '23 12:09 fubinzh

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

flowbehappy avatar Apr 23 '24 07:04 flowbehappy