-
Notifications
You must be signed in to change notification settings - Fork 709
Essential changefeed #22244
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
Open
shiyuhang0
wants to merge
8
commits into
pingcap:release-8.5
Choose a base branch
from
shiyuhang0:essential_changefeed
base: release-8.5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+490
−0
Open
Essential changefeed #22244
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ea0aa29
add ovewview
shiyuhang0 162e5fe
add changefeed
shiyuhang0 8948650
add kafka
shiyuhang0 8fbe9ce
add toc
shiyuhang0 a3ecf3e
add kafka
shiyuhang0 90c8a4f
Apply suggestions from code review
shiyuhang0 c7f2950
fix changefeed
shiyuhang0 3623e4a
fix link
shiyuhang0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| --- | ||
| title: Changefeed | ||
| summary: TiDB Cloud changefeed helps you stream data from TiDB Cloud to other data services. | ||
| --- | ||
|
|
||
| # Changefeed | ||
|
|
||
| TiDB Cloud changefeed helps you stream data from TiDB Cloud to other data services. Currently, TiDB Cloud supports streaming data to Apache Kafka and MySQL. | ||
|
|
||
| > **Note:** | ||
| > | ||
| > - Currently, TiDB Cloud only allows up to 10 changefeeds per {{{ .essential }}} cluster. | ||
| > - For [{{{ .starter }}}](/tidb-cloud/select-cluster-tier.md#starter) clusters, the changefeed feature is unavailable. | ||
|
|
||
| ## View the Changefeed page | ||
|
|
||
| To access the changefeed feature, take the following steps: | ||
|
|
||
| 1. Log in to the [TiDB Cloud console](https://tidbcloud.com/) and navigate to the [**Clusters**](https://tidbcloud.com/project/clusters) page of your project. | ||
|
|
||
| > **Tip:** | ||
| > | ||
| > You can use the combo box in the upper-left corner to switch between organizations, projects, and clusters. | ||
|
|
||
| 2. Click the name of your target cluster to go to its overview page, and then click **Data** > **Changefeed** in the left navigation pane. The changefeed page is displayed. | ||
|
|
||
| On the **Changefeed** page, you can create a changefeed, view a list of existing changefeeds, and operate the existing changefeeds (such as scaling, pausing, resuming, editing, and deleting a changefeed). | ||
|
|
||
| ## Create a changefeed | ||
|
|
||
| To create a changefeed, refer to the tutorials: | ||
|
|
||
| - [Sink to Apache Kafka](/tidb-cloud/essential-changefeed-sink-to-kafka.md) | ||
| - [Sink to MySQL](/tidb-cloud/essential-changefeed-sink-to-mysql.md) | ||
|
|
||
| ## View a changefeed | ||
|
|
||
| <SimpleTab> | ||
| <div label="Console"> | ||
|
|
||
| 1. Navigate to the [**Changefeed**](#view-the-changefeed-page) page of your target TiDB cluster. | ||
| 2. Locate the corresponding changefeed you want to view, and click **...** > **View** in the **Action** column. | ||
| 3. You can see the details of a changefeed, including its configuration, status, and metrics. | ||
|
|
||
| </div> | ||
|
|
||
| <div label="CLI"> | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed get -c <cluster-id> --changefeed-id <changefeed-id> | ||
| ``` | ||
|
|
||
| </div> | ||
| </SimpleTab> | ||
|
|
||
| ## Pause or resume a changefeed | ||
|
|
||
| <SimpleTab> | ||
| <div label="Console"> | ||
|
|
||
| 1. Navigate to the [**Changefeed**](#view-the-changefeed-page) page of your target TiDB cluster. | ||
| 2. Locate the corresponding changefeed you want to pause or resume, and click **...** > **Pause/Resume** in the **Action** column. | ||
|
|
||
| </div> | ||
|
|
||
| <div label="CLI"> | ||
|
|
||
| To pause a changefeed: | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed pause -c <cluster-id> --changefeed-id <changefeed-id> | ||
| ``` | ||
|
|
||
| To resume a changefeed: | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed resume -c <cluster-id> --changefeed-id <changefeed-id> | ||
| ``` | ||
|
|
||
| </div> | ||
| </SimpleTab> | ||
|
|
||
| ## Edit a changefeed | ||
|
|
||
| > **Note:** | ||
| > | ||
| > TiDB Cloud currently only allows editing changefeeds that are in the `Paused` state. | ||
|
|
||
| <SimpleTab> | ||
| <div label="Console"> | ||
|
|
||
| 1. Navigate to the [**Changefeed**](#view-the-changefeed-page) page of your target TiDB cluster. | ||
| 2. Locate the changefeed you want to pause, and click **...** > **Pause** in the **Action** column. | ||
| 3. When the changefeed status changes to `Paused`, click **...** > **Edit** to edit the corresponding changefeed. | ||
|
|
||
| TiDB Cloud populates the changefeed configuration by default. You can modify the following configurations: | ||
|
|
||
| - Apache Kafka sink: all configurations except **Destination**, **Connection** and **Start Position** | ||
| - MySQL sink: all configurations except **Destination**, **Connection** and **Start Position** | ||
|
|
||
| 4. After editing the configuration, click **...** > **Resume** to resume the corresponding changefeed. | ||
|
|
||
| </div> | ||
|
|
||
| <div label="CLI"> | ||
|
|
||
| Edit a changefeed with Apache Kafka sink: | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed edit -c <cluster-id> --changefeed-id <changefeed-id> --name <new-displayName> --kafka <full-specified-kafka> --filter <full-specified-filter> | ||
| ``` | ||
|
|
||
| Edit a changefeed with MySQL sink: | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed edit -c <cluster-id> --changefeed-id <changefeed-id> --name <new-displayName> --mysql <full-specified-mysql> --filter <full-specified-filter> | ||
| ``` | ||
|
|
||
| </div> | ||
| </SimpleTab> | ||
|
|
||
| ## Duplicate a changefeed | ||
|
|
||
| 1. Navigate to the [**Changefeed**](#view-the-changefeed-page) page of your target TiDB cluster. | ||
| 2. Locate the changefeed that you want to duplicate. In the **Action** column, click **...** > **Duplicate**. | ||
| 3. TiDB Cloud automatically populates the new changefeed configuration with the original settings. You can review and modify the configuration as needed. | ||
| 4. After confirming the configuration, click **Submit** to create and start the new changefeed. | ||
|
|
||
| ## Delete a changefeed | ||
|
|
||
| <SimpleTab> | ||
| <div label="Console"> | ||
|
|
||
| 1. Navigate to the [**Changefeed**](#view-the-changefeed-page) page of your target TiDB cluster. | ||
| 2. Locate the corresponding changefeed you want to delete, and click **...** > **Delete** in the **Action** column. | ||
|
|
||
| </div> | ||
|
|
||
| <div label="CLI"> | ||
|
|
||
| ``` | ||
| ticloud serverless changefeed delete -c <cluster-id> --changefeed-id <changefeed-id> | ||
| ``` | ||
|
|
||
| </div> | ||
| </SimpleTab> | ||
|
|
||
| ## Changefeed billing | ||
|
|
||
| Free of charge during the beta period. | ||
|
|
||
| ## Changefeed states | ||
|
|
||
| During the running process, changefeeds might fail with errors, or be manually paused or resumed. These behaviors can lead to changes of the changefeed state. | ||
|
|
||
| The states are described as follows: | ||
|
|
||
| - `CREATING`: the changefeed is being created. | ||
| - `CREATE_FAILED`: the changefeed creation fails. You need to delete the changefeed and create a new one. | ||
| - `RUNNING`: the changefeed runs normally and the checkpoint-ts proceeds normally. | ||
| - `PAUSED`: the changefeed is paused. | ||
| - `WARNING`: the changefeed returns a warning. The changefeed cannot continue due to some recoverable errors. The changefeed in this state keeps trying to resume until the state transfers to `RUNNING`. The changefeed in this state blocks [GC operations](https://docs.pingcap.com/tidb/stable/garbage-collection-overview). | ||
shiyuhang0 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `RUNNING_FAILED`: the changefeed fails. Due to some errors, the changefeed cannot resume and cannot be recovered automatically. If the issues are resolved before the garbage collection (GC) of the incremental data, you can manually resume the failed changefeed. The default Time-To-Live (TTL) duration for incremental data is 24 hours, which means that the GC mechanism does not delete any data within 24 hours after the changefeed is interrupted. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.