pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
426 stars 282 forks source link

View capture server state for a given changefeed #9062

Open charleszheng44 opened 1 year ago

charleszheng44 commented 1 year ago

Is your feature request related to a problem?

The scheduling of tables in a changefeed is limited to the "CaptureStateInitialized" state of the capture server. Unfortunately, there is no straightforward method to check whether a capture server is in the "CaptureStateInitialized" state since it is an in-memory state stored within the changefeed scheduler. This behavior presents a significant challenge when troubleshooting scenarios where table imbalances have been reported by users.

Describe the feature you'd like

Able to view the capture state from a changefeed's perspective.

Describe alternatives you've considered

Include a subfield CaptureStates to the output of the command cdc cli changefeed query -c <changefeed-id> command:

"CaptureStates": {
    "Initialized": ["cap-1", "cap-2"],
    "Uninitialized": ["cap-3"],
    "Stopping": ["cap-4"]
}

Teachability, Documentation, Adoption, Migration Strategy

No response

charleszheng44 commented 1 year ago

/assign