Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TICDC的gcSafePointTs是什么意思?
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]
TiDB version is 4.0.5
TiCDC version is 4.0.16
When pulling data, it keeps reporting tidb’s gcSafePointTs=18446744073709551614, and it doesn’t advance. What is the reason for this?
This time is abnormal, it exceeds the long type.
Please upgrade all tool components to the same version number~
The gcSafePointTs
is an important parameter in TiDB, representing the minimum timestamp for all committed transactions in the current TiDB instance. In TiCDC, gcSafePointTs
is used to determine the starting timestamp for CDC data synchronization to ensure data consistency and correctness.
In your case, the reported gcSafePointTs
value is 18446744073709551614
, which exceeds the long type timestamp and is abnormal. According to the TiDB official documentation, this value is usually a positive integer representing a timestamp in seconds. Therefore, you need to check the configuration and status of the TiDB instance to determine why the gcSafePointTs
value is abnormal and cannot advance.
First, you can try using the following command to check the status of the TiDB instance:
tiup cluster display <cluster-name>
This will display the status and configuration information of the TiDB cluster. You can check whether the gcSafePointTs
parameter value is correct and ensure that the TiDB instance is running normally.
If the TiDB instance is running normally but the gcSafePointTs
value is still abnormal, you can try manually setting the gcSafePointTs
parameter value. Specifically, you can use the following command to set gcSafePointTs
to the current timestamp:
tiup ctl:v4.0.5 pd -u http://<pd-address>:<pd-port> update-gc-safe-point $(date +%s)
Here, <pd-address>
and <pd-port>
are the address and port number of the PD node in your TiDB cluster. This will update the gcSafePointTs
parameter in the PD node and set it to the current timestamp. Then, you can restart the TiCDC instance so that it uses the new gcSafePointTs
value to start synchronizing data.
Is this CDC a newly started changefeed? If so, please send the creation command. It might be caused by a typo in the specified start-ts.
This is caused by the incompatibility between CDC 4.0.16 and PD versions. I have encountered it as well.