Recovery Interrupted: Where to Find Checkpoint-TSO

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

Original topic: reparo 恢复中断 checkpoint-tso 从哪儿找

| username: suqingbin0315

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] v6.1.1
[Encountered Problem: Problem Phenomenon and Impact] Where can I find the checkpoint-tso when the reparo recovery is interrupted? Is it the ts in the log?
Is the ts=441004130189443074 in my log the one?
[2023/04/24 19:00:04.384 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004130189443074] [datetime=2023/04/24 08:47:29.563 +08:00]

| username: suqingbin0315 | Original post link

[2023/04/24 19:00:04.384 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004122325123074] [datetime=2023/04/24 08:46:59.563 +08:00]
[2023/04/24 19:00:04.384 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004130189443074] [datetime=2023/04/24 08:47:29.563 +08:00]
[schema=] [table=]
[2023/04/24 19:00:05.714 +08:00] [INFO] [main.go:61] [“got signal to exit.”] [signal=interrupt]

| username: suqingbin0315 | Original post link

Set the configuration item start-tso to checkpoint-tso + 1, set stop-tso to checkpoint-tso + 80,000,000,000 (approximately 5 minutes after checkpoint-tso), and set safe-mode to true.
start-tso = 441004130189443075
stop-tso = 441004210189443075
The log output is as follows:
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004138053763074] [datetime=2023/04/24 08:47:59.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004145918083074] [datetime=2023/04/24 08:48:29.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004153782403074] [datetime=2023/04/24 08:48:59.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004161646723074] [datetime=2023/04/24 08:49:29.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004169511043074] [datetime=2023/04/24 08:49:59.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004177375363074] [datetime=2023/04/24 08:50:29.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004185239683074] [datetime=2023/04/24 08:50:59.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004193104003074] [datetime=2023/04/24 08:51:29.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004200968323074] [datetime=2023/04/24 08:51:59.563 +08:00]
[2023/04/25 10:38:13.323 +08:00] [INFO] [reparo.go:83] [“sync binlog success”] [ts=441004208832643074] [datetime=2023/04/24 08:52:29.563 +08:00]
[2023/04/25 10:38:13.449 +08:00] [INFO] [read.go:123] [“read file end”] [file=/root/tidb-community-toolkit-v6.1.1-linux-amd64/binlog-0000000000000000-20230418113400]
[2023/04/25 10:38:13.449 +08:00] [INFO] [load.go:916] [“Loader has been closed. Start quitting txnManager”]
[2023/04/25 10:38:13.449 +08:00] [INFO] [load.go:906] [“run()… in txnManager quit”]
[2023/04/25 10:38:13.449 +08:00] [INFO] [load.go:962] [“txnManager has been closed”]
[2023/04/25 10:38:13.450 +08:00] [INFO] [load.go:640] [“{16 20 false 1 true true false 1}”]
[2023/04/25 10:38:13.450 +08:00] [INFO] [load.go:641] [“Run()… in Loader quit”]
[2023/04/25 10:38:13.450 +08:00] [INFO] [mysql.go:114] [“Successes chan quit”]

When running again, there is still a primary key conflict:
After Reparo automatically stops, set start-tso to checkpoint tso + 80,000,000,001, set stop-tso to 0, and set safe-mode to false.
start-tso = 441004210189443076
stop-tso = 0

| username: xingzhenxiang | Original post link

The image is not visible. Please provide the text you need translated.

| username: suqingbin0315 | Original post link

When I was using reparo to restore the binlog, I accidentally interrupted it by pressing Ctrl+C. According to the documentation at TiDB Binlog 常见问题 | PingCAP 文档中心, it says that if Reparo is interrupted during the process of restoring using the full + incremental method, you can use the last TSO in the log to resume synchronization. However, it didn’t work during the operation.

| username: suqingbin0315 | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: xingzhenxiang | Original post link

I am looking at this document:

| username: suqingbin0315 | Original post link

Why does no one know?

| username: xingzhenxiang | Original post link

Not many people know that mysqlbinlog can remotely back up logs, let alone this.

| username: suqingbin0315 | Original post link

This is the log when I interrupted with ctrl+c. After some research, I still haven’t found where to find the TSO mentioned in “record the last TSO in the log, referred to as checkpoint-tso.”