Skip to content

Running changefeed resume reports success and creates unnecessary GC guard #4893

@wlwilliamx

Description

@wlwilliamx

What did you do?

Run cdc cli changefeed resume --changefeed-id <id> for a changefeed whose state is normal.

The current code path also lets the HTTP resume handler continue into resume validation before the controller later treats the running changefeed resume as a no-op.

What did you expect to see?

The CLI/API should reject the request because a normal changefeed is already running.

The rejected request should not create a temporary resuming GC safepoint/barrier.

What did you see instead?

The CLI prints:

Resume changefeed successfully!
ID: <id>

The controller silently ignores the resume because the state is not stopped/failed/finished.

Before that no-op, the API can still call resume GC safety validation. For a non-overwrite resume this can leave a resuming GC safepoint/barrier until TTL expiration, even though no resume actually happened.

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

N/A

Upstream TiKV version (execute tikv-server --version):

N/A

TiCDC version (execute cdc version):

upstream/master before this fix; observed by code inspection at 170515398692050cfdac2a5080b478ac2424ee21

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions