Repository navigation
ticdc: clarify scheduler.write-key-threshold across architectures - #23949
doc-claw-bot wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: pingcap/docs/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: fe6df806-bff0-4ed1-80d4-a9c126709682
📒 Files selected for processing (3)
ticdc/ticdc-architecture.mdticdc/ticdc-changefeed-config.mdticdc/ticdc-sink-to-kafka.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| # TiCDC will check whether the write traffic is greater than `write-key-threshold` first. | ||
| # If not, next check whether the number of Regions is greater than `region-threshold`. | ||
| write-key-threshold = 30000 | ||
| write-key-threshold = 10485760 |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
git diff --no-ext-diff 1e852511d8a7994ebdeb3641b5462d4844434016 0775fe4fb5e3c135c77ffb7f6077aabbfeedc12c -- ticdc/ticdc-sink-to-kafka.md
printf '\n--- current section ---\n'
sed -n '340,392p' ticdc/ticdc-sink-to-kafka.mdRepository: pingcap/docs
Length of output: 7192
Mark the sample threshold as new-architecture-specific.
The page also covers classic TiCDC, where write-key-threshold uses PD Region written_keys. Direct classic users to choose a threshold based on that statistic.
Suggested fix
-write-key-threshold = 10485760
+write-key-threshold = 10485760 # Example for the new architecture; choose a classic value based on PD Region written_keys.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| write-key-threshold = 10485760 | |
| write-key-threshold = 10485760 # Example for the new architecture; choose a classic value based on PD Region written_keys. |
0775fe4 to
8d441a5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: pingcap/docs/.coderabbit.yaml
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
c6f2e940-4776-46ba-b974-d6b625ad5efc
📒 Files selected for processing: 2
ticdc/ticdc-architecture.mdticdc/ticdc-sink-to-kafka.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| - [`scheduler.region-threshold`](/ticdc/ticdc-changefeed-config.md#region-threshold): the default value is `10000`. When the number of Regions in a table exceeds this threshold, TiCDC splits the table. For tables with relatively few Regions but high overall write throughput, you can reduce this value appropriately. This parameter must be greater than or equal to `scheduler.region-count-per-span`. Otherwise, tasks might be rescheduled repeatedly, which increases replication latency. | ||
| - [`scheduler.region-count-per-span`](/ticdc/ticdc-changefeed-config.md#region-count-per-span-new-in-v854): the default value is `100`. During changefeed initialization, TiCDC splits tables that meet the split conditions according to this parameter. After splitting, each sub-table contains at most `region-count-per-span` Regions. | ||
| - [`scheduler.write-key-threshold`](/ticdc/ticdc-changefeed-config.md#write-key-threshold): the default value is `0` (disabled). When the sink write throughput of a table exceeds this threshold, TiCDC triggers table splitting. In most cases, keep this parameter at `0`. | ||
| - [`scheduler.write-key-threshold`](/ticdc/ticdc-changefeed-config.md#write-key-threshold): the default value is `0` (disabled). In the new architecture, this value is measured in sink DML event bytes per second. When `scheduler.enable-table-across-nodes = true`, if you set a positive value smaller than `10485760` (10 MiB), TiCDC automatically adjusts it to `10485760`. In most cases, keep this parameter at `0`. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '74,80p' ticdc/ticdc-architecture.md
sed -n '174,181p' ticdc/ticdc-changefeed-config.md
sed -n '373,382p' ticdc/ticdc-sink-to-kafka.mdRepository: pingcap/docs
Length of output: 3014
Use 10 MiB/s for the new-architecture minimum in all three pages.
Each occurrence describes scheduler.write-key-threshold as sink DML event bytes per second, but labels the minimum as 10 MiB. Update the parenthetical at ticdc/ticdc-architecture.md:77, ticdc/ticdc-changefeed-config.md:178, and ticdc/ticdc-sink-to-kafka.md:377-378 to 10 MiB/s.
|
@wk989898: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: 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. |
First-time contributors' checklist
What is changed, added or deleted? (Required)
scheduler.write-key-thresholduses different metrics in the TiCDC classic and new architectures.0as disabling traffic-based splitting and auto-adjusts positive values below10485760(10 MiB) whenscheduler.enable-table-across-nodes = true.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit