After starting the task with cdc using --disable-gc-check, the task still reports an error: GC life time is shorter than transaction duration

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: cdc 使用 --disable-gc-check 启动任务后,运行任务依旧报错 GC life time is shorter than transaction duration

| username: rebelsre

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] V4.0.10 → V7.5.1
[Reproduction Path] Use dumpling + lightning to synchronize full data, then use cdc to synchronize incremental data
[Encountered Problem: Issue Phenomenon and Impact]
Error [CDC:ErrMetaListDatabases][tikv:9006]GC life time is shorter than transaction duration, transaction starts at 2024-04-28 14:30:03.04 +0800 CST, GC safe point is 2024-04-28 16:22:35.54 +0800 CST
Used --disable-gc-check to skip this issue when creating the task, but although the task can be created, the error still occurs during task execution
TiCDC Troubleshooting | PingCAP Documentation Center
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: rebelsre | Original post link

The current solution found is to increase the GC time, which means that the --disable-gc-check parameter is somewhat of a stopgap measure.
Additionally, the question arises, what is the GC time parameter for version 4.0? tidb_gc_run_interval was introduced in version 5.0.

| username: 裤衩儿飞上天 | Original post link

In the mysql.tidb table, there is a record called tikv_gc_run_interval. Modify it.

Test it before making changes~

| username: rebelsre | Original post link

Yes, I found it, thank you.
TiDB Garbage Collection (GC) | PingCAP Archived Documentation

| username: WalterWj | Original post link

It is not recommended to use CDC in lower versions.