Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream: support ticdc topology info in tidb dashboard #1209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wlwilliamx
Copy link
Collaborator

@wlwilliamx wlwilliamx commented Apr 7, 2025

What problem does this PR solve?

Issue Number: close #1115

What is changed and how it works?

This PR adds support for showing TiCDC cluster node information in the TiDB Dashboard. It works by writing each TiCDC node’s topology info into etcd under the key /topology/ticdc/{clusterID}/{ip:port}. The data includes basic node metadata and is registered with a lease so it gets cleaned up automatically if the node goes down.

The TiDB Dashboard can read from the /topology/ticdc/ prefix, parse the values, and display the list of active TiCDC nodes along with their details. This helps users get a better view of the CDC cluster status directly from the dashboard without needing to query it separately.

Related code in tidb-dashboard repo: https://github.com/pingcap/tidb-dashboard/blob/release-9.0-beta.1/pkg/utils/topology/ticdc.go#L22.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

CleanShot 2025-04-07 at 12 15 33@2x
CleanShot 2025-04-07 at 12 16 15@2x
CleanShot 2025-04-07 at 12 16 36@2x

Questions

Will it cause performance regression or break compatibility?

No.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 7, 2025
Copy link

ti-chi-bot bot commented Apr 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from wlwilliamx, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 7, 2025
@wlwilliamx wlwilliamx requested a review from Copilot April 7, 2025 06:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

pkg/upstream/upstream.go:358

  • The use of 'clientV3.WithLease' here may not be compatible with the updated etcd.Client interface. Consider using the corresponding lease option provided by the new etcd client wrapper to ensure consistency.
_, err = up.etcdCli.Put(ctx, key, string(value), clientV3.WithLease(up.session.Lease()))

pkg/upstream/manager.go:31

  • The comment refers to 'CaptureTopologyCfg' while the actual type is named 'NodeTopologyCfg'. Consider updating the comment to match the type name for clarity.
// CaptureTopologyCfg stores the information of the capture topology.

@wlwilliamx
Copy link
Collaborator Author

/check-issue-triage-complete

@wk989898
Copy link
Collaborator

wk989898 commented Apr 7, 2025

Does it conflict with the old TiCDC?

Copy link

ti-chi-bot bot commented Apr 8, 2025

@wlwilliamx: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cdc-storage-integration-light 67a1ecc link true /test pull-cdc-storage-integration-light

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiCDC new arch is not compatible with dashboard
2 participants