Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9c24ce2
Add files via upload
qiancai Sep 2, 2025
5b0f5a4
Add files via upload
qiancai Sep 2, 2025
fb28ac3
Add files via upload
qiancai Sep 2, 2025
a38b9ec
Update sync-cloud-zh-toc.yml
qiancai Sep 2, 2025
07ca99b
Add files via upload
qiancai Sep 2, 2025
3721393
Update sync-cloud-zh-toc.yml
qiancai Sep 2, 2025
20e8574
Merge branch 'master' of github.com:qiancai/docs
qiancai Sep 5, 2025
50a5f9a
Merge branch 'master' of github.com:qiancai/docs
qiancai Sep 9, 2025
7a411d4
Merge branch 'master' of github.com:qiancai/docs
qiancai Sep 15, 2025
7dbc37b
Merge branch 'master' of github.com:qiancai/docs
qiancai Sep 24, 2025
2aadfeb
add files
qiancai Sep 25, 2025
4fce98f
Discard changes to system-variables.md
qiancai Sep 25, 2025
e68d1c2
Discard changes to ticdc/ticdc-faq.md
qiancai Sep 25, 2025
88d9864
Discard changes to tikv-configuration-file.md
qiancai Sep 25, 2025
ab90fca
Merge pull request #43 from qiancai/sync
qiancai Sep 25, 2025
e7ed7d1
Update main_workflow.py
qiancai Sep 26, 2025
11efdef
Update sync-docs-cn-to-en.yml
qiancai Sep 26, 2025
322c671
Merge branch 'pingcap:master' into master
qiancai Sep 29, 2025
38c7536
Merge branch 'pingcap:master' into master
qiancai Sep 30, 2025
7e9621c
Merge branch 'upstream-master'
qiancai Oct 21, 2025
ebe65dd
Delete scripts/translate_doc_pr directory
qiancai Oct 21, 2025
bed0d76
Delete sync-en-cloud-toc-changes-to-zh.py
qiancai Oct 21, 2025
c748b45
Merge branch 'master' of github.com:qiancai/docs
qiancai Oct 21, 2025
bcea1e9
change the path to the scripts
qiancai Oct 21, 2025
3086f31
Add temp.md
qiancai Oct 21, 2025
05f6804
Delete temp.md
qiancai Oct 21, 2025
3edad37
Auto-sync: Update English docs from Chinese PR https://github.com/qia…
github-actions[bot] Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions .github/workflows/sync-docs-cn-to-en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Sync Docs Changes from ZH PR to EN PR

on:
workflow_dispatch:
inputs:
source_pr_url:
description: 'Source PR URL (Chinese docs repository)'
required: true
type: string
default: ''
target_pr_url:
description: 'Target PR URL (English docs repository)'
required: true
type: string
default: ''
ai_provider:
description: 'AI Provider to use for translation'
required: false
type: choice
options:
- deepseek
- gemini
default: 'gemini'

jobs:
sync-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Checkout ai-pr-translator repository
uses: actions/checkout@v4
with:
repository: "qiancai/ai-pr-translator"
ref: "main"
path: "ai-pr-translator"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ai-pr-translator/scripts/requirements.txt

- name: Extract PR information
id: extract_info
run: |
# Extract source repo info
SOURCE_URL="${{ github.event.inputs.source_pr_url }}"
SOURCE_OWNER=$(echo $SOURCE_URL | cut -d'/' -f4)
SOURCE_REPO=$(echo $SOURCE_URL | cut -d'/' -f5)
SOURCE_PR=$(echo $SOURCE_URL | cut -d'/' -f7)

# Extract target repo info
TARGET_URL="${{ github.event.inputs.target_pr_url }}"
TARGET_OWNER=$(echo $TARGET_URL | cut -d'/' -f4)
TARGET_REPO=$(echo $TARGET_URL | cut -d'/' -f5)
TARGET_PR=$(echo $TARGET_URL | cut -d'/' -f7)

echo "source_owner=${SOURCE_OWNER}" >> $GITHUB_OUTPUT
echo "source_repo=${SOURCE_REPO}" >> $GITHUB_OUTPUT
echo "source_pr=${SOURCE_PR}" >> $GITHUB_OUTPUT
echo "target_owner=${TARGET_OWNER}" >> $GITHUB_OUTPUT
echo "target_repo=${TARGET_REPO}" >> $GITHUB_OUTPUT
echo "target_pr=${TARGET_PR}" >> $GITHUB_OUTPUT

echo "Source: ${SOURCE_OWNER}/${SOURCE_REPO}#${SOURCE_PR}"
echo "Target: ${TARGET_OWNER}/${TARGET_REPO}#${TARGET_PR}"

- name: Get target PR branch info
id: target_branch
run: |
# Get target PR branch name
TARGET_BRANCH=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ steps.extract_info.outputs.target_owner }}/${{ steps.extract_info.outputs.target_repo }}/pulls/${{ steps.extract_info.outputs.target_pr }}" \
| jq -r '.head.ref')

echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
echo "Target branch: ${TARGET_BRANCH}"

- name: Clone target repository
run: |
# Clone target repository with the PR branch
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ steps.extract_info.outputs.target_owner }}/${{ steps.extract_info.outputs.target_repo }}.git target_repo
cd target_repo
git checkout ${{ steps.target_branch.outputs.target_branch }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Run sync script
id: sync_script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEEPSEEK_API_TOKEN: ${{ secrets.DEEPSEEK_API_TOKEN }}
GEMINI_API_TOKEN: ${{ secrets.GEMINI_API_TOKEN }}
SOURCE_PR_URL: ${{ github.event.inputs.source_pr_url }}
TARGET_PR_URL: ${{ github.event.inputs.target_pr_url }}
AI_PROVIDER: ${{ github.event.inputs.ai_provider }}
TARGET_REPO_PATH: ${{ github.workspace }}/target_repo
run: |
cd ai-pr-translator/scripts
if python main_workflow.py; then
echo "sync_success=true" >> $GITHUB_OUTPUT
echo "✅ Sync script completed successfully"
else
echo "sync_success=false" >> $GITHUB_OUTPUT
echo "❌ Sync script failed"
exit 1
fi

- name: Commit and push changes
if: steps.sync_script.outputs.sync_success == 'true'
run: |
cd target_repo
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-sync: Update English docs from Chinese PR ${{ github.event.inputs.source_pr_url }}

Synced from: ${{ github.event.inputs.source_pr_url }}
Target PR: ${{ github.event.inputs.target_pr_url }}
AI Provider: ${{ github.event.inputs.ai_provider }}

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>"

git push origin ${{ steps.target_branch.outputs.target_branch }}
echo "Changes pushed to target PR branch: ${{ steps.target_branch.outputs.target_branch }}"
fi

- name: Add success comment to target PR
if: steps.sync_script.outputs.sync_success == 'true'
run: |
# Add a comment to the target PR about the sync success
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ steps.extract_info.outputs.target_owner }}/${{ steps.extract_info.outputs.target_repo }}/issues/${{ steps.extract_info.outputs.target_pr }}/comments" \
-d "{
\"body\": \"🤖 **Auto-sync completed successfully**\\n\\n📥 **Source PR**: ${{ github.event.inputs.source_pr_url }}\\n🎯 **Target PR**: ${{ github.event.inputs.target_pr_url }}\\n✅ English documentation has been updated based on Chinese documentation changes.\\n\\n_This comment was generated automatically by the sync workflow._\"
}"

- name: Add failure comment to target PR
if: steps.sync_script.outputs.sync_success == 'false'
run: |
# Add a comment to the target PR about the sync failure
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ steps.extract_info.outputs.target_owner }}/${{ steps.extract_info.outputs.target_repo }}/issues/${{ steps.extract_info.outputs.target_pr }}/comments" \
-d "{
\"body\": \"🤖 **Auto-sync failed**\\n\\n📥 **Source PR**: ${{ github.event.inputs.source_pr_url }}\\n🎯 **Target PR**: ${{ github.event.inputs.target_pr_url }}\\n❌ The sync process encountered an error. Please check the workflow logs for details.\\n\\n_This comment was generated automatically by the sync workflow._\"
}"
2 changes: 1 addition & 1 deletion scripts/sync-en-cloud-toc-changes-to-zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from urllib.error import URLError, HTTPError
from google import genai

REPO_OWNER = "pingcap"
REPO_OWNER = "qiancai"
REPO_NAME = "docs"
EN_BRANCH = "release-8.5"
ZH_BRANCH = "i18n-zh-release-8.5"
Expand Down
12 changes: 10 additions & 2 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,6 @@ mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1;
- If `tidb_ddl_enable_fast_reorg` is set to `OFF`, `ADD INDEX` is executed as a transaction. If there are many update operations such as `UPDATE` and `REPLACE` in the target columns during the `ADD INDEX` execution, a larger batch size indicates a larger probability of transaction conflicts. In this case, it is recommended that you set the batch size to a smaller value. The minimum value is 32.
- If the transaction conflict does not exist, or if `tidb_ddl_enable_fast_reorg` is set to `ON`, you can set the batch size to a large value. This makes data backfilling faster but also increases the write pressure on TiKV. For a proper batch size, you also need to refer to the value of `tidb_ddl_reorg_worker_cnt`. See [Interaction Test on Online Workloads and `ADD INDEX` Operations](https://docs.pingcap.com/tidb/dev/online-workloads-and-add-index-operations) for reference.
- Starting from v8.3.0, this parameter is supported at the SESSION level. Modifying the parameter at the GLOBAL level will not impact currently running DDL statements. It will only apply to DDLs submitted in new sessions.
- Starting from v8.5.0, you can modify this parameter for a running DDL job by executing `ADMIN ALTER DDL JOBS <job_id> BATCH_SIZE = <new_batch_size>;`. Note that this operation is not supported for `ADD INDEX` DDL when [`tidb_enable_dist_task`](/system-variables.md#tidb_enable_dist_task-new-in-v710) is enabled. For details, see [`ADMIN ALTER DDL JOBS`](/sql-statements/sql-statement-admin-alter-ddl.md).

### tidb_ddl_reorg_priority

Expand Down Expand Up @@ -1779,7 +1778,6 @@ Assume that you have a cluster with 4 TiDB nodes and multiple TiKV nodes. In thi
- Unit: Threads
- This variable is used to set the concurrency of the DDL operation in the `re-organize` phase.
- Starting from v8.3.0, this parameter is supported at the SESSION level. Modifying the parameter at the GLOBAL level will not impact currently running DDL statements. It will only apply to DDLs submitted in new sessions.
- Starting from v8.5.0, you can modify this parameter for a running DDL job by executing `ADMIN ALTER DDL JOBS <job_id> THREAD = <new_thread_count>;`. Note that this operation is not supported for `ADD INDEX` DDL when [`tidb_enable_dist_task`](/system-variables.md#tidb_enable_dist_task-new-in-v710) is enabled. For details, see [`ADMIN ALTER DDL JOBS`](/sql-statements/sql-statement-admin-alter-ddl.md).

### `tidb_enable_fast_create_table` <span class="version-mark">New in v8.0.0</span>

Expand All @@ -1793,6 +1791,16 @@ Assume that you have a cluster with 4 TiDB nodes and multiple TiKV nodes. In thi
- This variable is renamed from the variable [`tidb_ddl_version`](https://docs-archive.pingcap.com/tidb/v7.6/system-variables#tidb_ddl_version-new-in-v760) that is introduced in v7.6.0. Starting from v8.0.0, `tidb_ddl_version` no longer takes effect.
- Starting from TiDB v8.5.0, the accelerated table creation feature is enabled by default for newly created clusters, with `tidb_enable_fast_create_table` set to `ON`. For clusters upgraded from v8.4.0 or earlier versions, the default value of `tidb_enable_fast_create_table` remains unchanged.

### `tidb_opt_selectivity_factor` <span class="version-mark">Introduced in v9.0.0</span>

- Scope: SESSION | GLOBAL
- Is persisted to the cluster: Yes
- Is controlled by the Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
- Type: Floating-point number
- Value range: `[0, 1]`
- Default value: `0.8`
- This variable is used to specify the default selectivity of the TiDB optimizer. In some cases, when the optimizer cannot derive the predicate selectivity based on statistics, the optimizer uses this default selectivity as an alternative value. **It is not recommended** to modify this value.

Choose a reason for hiding this comment

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

medium

To improve clarity, consider rephrasing this sentence to emphasize the potential negative consequences of modifying this variable. For example: "Modifying this value is strongly discouraged as it can significantly impact query optimization and performance."


### tidb_default_string_match_selectivity <span class="version-mark">New in v6.2.0</span>

- Scope: SESSION | GLOBAL
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ If the downstream is a TiDB cluster or MySQL instance, it is recommended that yo

## Replication of a single table can only be run on a single TiCDC node. Will it be possible to use multiple TiCDC nodes to replicate data of multiple tables?

Starting from v7.1.0, TiCDC supports the MQ sink to replicate data change logs at the granularity of TiKV Regions, which achieves scalable processing capability and allows TiCDC to replicate a single table with a large number of Regions. To enable this feature, you can configure the following parameter in the [TiCDC changefeed configuration file](/ticdc/ticdc-changefeed-config.md):
Starting from v7.1.0, TiCDC supports the MQ sink to replicate data change logs at the granularity of TiKV Regions, which achieves scalable processing capability and allows TiCDC to replicate a single table with a large number of Regions. To enable this feature, you can configure the following parameter in the [TiCDC configuration file](/ticdc/ticdc-changefeed-config.md):

```toml
[scheduler]
Expand Down
4 changes: 2 additions & 2 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2709,8 +2709,8 @@ TiKV MVCC in-memory engine (IME) configuration items related to the storage laye
> + After the in-memory engine is enabled, `block-cache.capacity` automatically decreases by 10%.
> + If you manually configure `capacity`, `block-cache.capacity` does not automatically decrease. In this case, you need to manually adjust its value to avoid OOM.

+ Controls the maximum memory size that the [TiKV MVCC in-memory engine](/tikv-in-memory-engine.md) can use. The memory capacity determines the number of Regions that can be cached. When the capacity is full, the in-memory engine loads new Regions and evicts cached Regions based on the redundancy of Region MVCC.
+ Default value: `min(10% of the total system memory, 5 GiB)`
+ Controls the maximum memory size that the in-memory engine can use. The maximum value is 5 GiB. You can manually configure it to use more memory.
+ Default value: 10% of the system memory.

### `gc-run-interval` <span class="version-mark">New in v8.5.0</span>

Expand Down