What did you do?
I ran TiCDC in new architecture mode in a local integration scene with
replication worker. During normal teardown, the parent process sent SIGTERM
to TiCDC for graceful shutdown.
The scene is not specific to one test case. The important part is:
- start
cdc server --newarch ...
- let TiCDC run normally
- send
SIGTERM
- observe TiCDC logs and the process exit status from the parent supervisor
What did you expect to see?
TiCDC should exit with status 0 after a graceful SIGTERM shutdown.
What did you see instead?
TiCDC appeared to shut down normally in its own logs, but the process exited
with status 1 instead of 0.
This is problematic for supervisors and orchestration logic, because an
intentional graceful shutdown is reported as a failure.
Relevant TiCDC log excerpt:
[2026/03/20 16:28:38.464 +00:00] [INFO] [util.go:117] ["got signal, prepare to shutdown"] [signal=terminated]
[2026/03/20 16:28:38.552 +00:00] [INFO] [util.go:121] ["shutdown complete"]
[2026/03/20 16:28:38.634 +00:00] [INFO] [server.go:153] ["cdc server exits normally"]
[2026/03/20 16:28:38.634 +00:00] [INFO] [server.go:422] ["server closing"] [ServerInfo="ID: cb803d3c-e30d-4173-a806-49aedf672766, AdvertiseAddr: 127.0.0.1:8001, Version: v8.5.6-release.1-62-gedc009d6, GitHash: edc009d6c1d81ffd535096798e865682afd291d5, DeployPath: /cdc, StartTimestamp: 1774023664, Epoch: 0"]
[2026/03/20 16:28:38.941 +00:00] [INFO] [server.go:480] ["server closed"] [ServerInfo="ID: cb803d3c-e30d-4173-a806-49aedf672766, AdvertiseAddr: 127.0.0.1:8001, Version: v8.5.6-release.1-62-gedc009d6, GitHash: edc009d6c1d81ffd535096798e865682afd291d5, DeployPath: /cdc, StartTimestamp: 1774023664, Epoch: 0"]
From the parent supervisor side, the observed result was that TiCDC exited with
code 1 on this graceful shutdown path.
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
Upstream TiKV version (execute tikv-server --version):
Upstream PD version:
TiCDC version (execute cdc version):
v8.5.6-release.1-62-gedc009d6
GitHash: edc009d6c1d81ffd535096798e865682afd291d5
What did you do?
I ran TiCDC in new architecture mode in a local integration scene with
replication worker. During normal teardown, the parent process sent
SIGTERMto TiCDC for graceful shutdown.
The scene is not specific to one test case. The important part is:
cdc server --newarch ...SIGTERMWhat did you expect to see?
TiCDC should exit with status
0after a gracefulSIGTERMshutdown.What did you see instead?
TiCDC appeared to shut down normally in its own logs, but the process exited
with status
1instead of0.This is problematic for supervisors and orchestration logic, because an
intentional graceful shutdown is reported as a failure.
Relevant TiCDC log excerpt:
From the parent supervisor side, the observed result was that TiCDC exited with
code
1on this graceful shutdown path.Versions of the cluster
Upstream TiDB cluster version (execute
SELECT tidb_version();in a MySQL client):tidb-cse 8.5Upstream TiKV version (execute
tikv-server --version):CSE 8.5Upstream PD version:
pd-cse 8.5TiCDC version (execute
cdc version):