pingcap / pingcap/ticdc

Unverified changefeed updates are still saved into Coordinator memory despite not persisted into backend

Open
#4,133 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What did you do?
  1. Prepare
tiup playground-ng:nightly v8.5.5 --db 1 --kv 1 --pd 1 --ticdc 2 --ticdc.binpath ~/.tiup/components/cdc/v8.5.6-release.1/cdc --ticdc.config ./ticdc-newarch.toml --without-monitor

tiup cdc:v8.5.6-release.1 cli changefeed create -c c --sink-uri 'blackhole:'
tiup cdc:v8.5.6-release.1 cli changefeed pause -c c
tiup cdc:v8.5.6-release.1 cli changefeed query -c c | jq .sink_uri
# "blackhole:"
  1. Update changefeed to an invalid Sink
echo 'y' | tiup cdc:v8.5.6-release.1 cli changefeed update -c c --sink-uri 'whitehole:'
# Error: [CDC:ErrSinkURIInvalid]sink uri invalid 'whitehole:': [CDC:ErrSinkURIInvalid]sink uri invalid 'whitehole:'
  1. Check the Sink URI again
tiup cdc:v8.5.6-release.1 cli changefeed query -c c | jq .sink_uri
# "whitehole:" (<-- unexpected!)
  1. Move coordinator and check again
curl -X POST 'http://127.0.0.1:8300/api/v2/owner/resign'
# (move the coordinator to the other CDC)
tiup cdc:v8.5.6-release.1 cli changefeed query -c c | jq .sink_uri
# "blackhole:"
What did you expect to see?

If changefeed update failed, the in-memory changefeed info should not be modified. That is, step 3 should still print "blackhole:".

What did you see instead?

^

Versions of the cluster

v8.5.6-release.1
v8.5.5

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

Reproduce the failure with the CLI changefeed update and query commands, then inspect how the coordinator handles an update and the /api/v2/owner/resign endpoint. The change is done when an invalid update leaves the in-memory sink URI unchanged and querying after coordinator movement still returns "blackhole:".

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.