pingcap / pingcap/ticdc

Support creating changefeeds in a paused state

Open
#6,266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/feature-request
Dominant language
Go
Stars
56
Forks
63
Avg merge
2d 20h
Merged PRs (30d)
34

Description

Is your feature request related to a problem?

Creating a changefeed currently starts replication immediately. Some workflows need to validate and save the changefeed and protect its starting position, then explicitly start replication later.

Describe the feature you'd like

Support an optional pause parameter on POST /api/v2/changefeeds and top-level pause = true in the CLI TOML configuration.

  • Omitted or false: preserve the existing automatic startup behavior.
  • true: perform the normal configuration, table, sink, TSO and GC safety checks, then persist the changefeed in the existing stopped state without scheduling replication.
  • Initialize the checkpoint to the validated start-ts and retain normal paused-changefeed GC protection and TTL limits.
  • Keep the changefeed stopped across restarts. The existing resume API/command starts replication from its saved checkpoint unless the caller explicitly overrides it.
  • Treat this as a create-only option; configuration updates must not implicitly pause or resume an existing task.
Describe alternatives you've considered

Creating a running changefeed and immediately pausing it leaves a window in which replication can already start. A paused initial state avoids that window.

Teachability, Documentation, Adoption, Migration Strategy

API callers can add "pause": true to the creation request. CLI users can put pause = true before any section headers in their TOML file and later run cdc cli changefeed resume --changefeed-id <id>.

Existing callers do not need to change. This does not introduce a new lifecycle state or unlimited data retention.

Implementation PR: https://github.com/pingcap/ticdc/pull/6265

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing implementation PR #6265 alongside the POST /api/v2/changefeeds entry point and the CLI TOML configuration and resume command mentioned in the issue. Done means creation can preserve the existing behavior by default, support a stopped initial state with the validated checkpoint, and leave updates and restarts unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.