Skip to content

Commit 35bada8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into docs-api
2 parents ec8e347 + 3e6588b commit 35bada8

494 files changed

Lines changed: 7439 additions & 3358 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ai/AI-README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Use `resources/terms.md` when terminology is uncertain or not covered by the qui
2323
- `.ai/skills/review-doc-pr/`: review documentation PRs and Markdown diffs for factual accuracy, user usefulness, completeness, version fit, related-doc impact, links, and style
2424
- `.ai/skills/create-or-update-zh-translation-pr/`: create a new docs translation PR or update an existing one by combining repo-local scripts with minimal-edit translation rules and incremental source-diff handling
2525
- `.ai/skills/writing-doc-summaries/`: write or update the `summary` front matter field in a document following the repo's 115-145 character SEO-friendly sentence rules
26+
- `.ai/skills/write-review-translate-release-notes/`: write, review, revise, and translate TiDB release note entries for the Compatibility changes, Improvements, and Bug fixes sections in English and Chinese
2627

2728
The translation skill includes bundled scripts under `.ai/skills/create-or-update-zh-translation-pr/scripts/` for:
2829

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
name: release-notes
3+
description: Write, review, revise, and translate TiDB release notes for the Compatibility changes, Improvements, and Bug fixes sections in English and Chinese. Use this skill when working with release note entries, aligning English and Chinese content, auditing `release-X.X.X.md` files, or editing files under `docs/releases/` or `docs-cn/releases/`.
4+
---
5+
6+
# TiDB Release Notes
7+
8+
When you write, review, or translate a release note entry, use this skill to load the right references, apply the correct patterns, and produce output that matches the published format in `releases/` (`pingcap/docs` for English, `pingcap/docs-cn` for Chinese) for v6.1.0 and later.
9+
10+
## When to use this skill
11+
12+
Use this skill when the task involves any of the following:
13+
14+
- **Writing a new entry** based on a GitHub PR or issue description
15+
- **Reviewing or revising** an existing English or Chinese release note entry or section (Compatibility changes, Improvements, or Bug fixes), such as correcting the opening verb, tightening the description, or fixing style issues
16+
- **Translating** an entry between English and Chinese, including updating document anchor suffixes and verifying bilingual alignment
17+
18+
This skill applies to the three recurring sections in every `release-X.X.X.md` file: Compatibility changes, Improvements, and Bug fixes.
19+
20+
## Which reference to load
21+
22+
Load only what is necessary for the task:
23+
24+
| Task | Load |
25+
|------|------|
26+
| Compatibility changes (upgrade note block, behavior-change paragraph, system-variable table, config-parameter table, anchor suffixes) | [references/compatibility-changes.md](references/compatibility-changes.md) |
27+
| Improvement entries (opening verbs, English and Chinese patterns, examples) | [references/improvements.md](references/improvements.md) |
28+
| Bug-fix entries (fix templates, anti-patterns, English and Chinese patterns, examples) | [references/bug-fixes.md](references/bug-fixes.md) |
29+
| Translation, bilingual alignment check, or auditing paired files | [references/bilingual-alignment.md](references/bilingual-alignment.md) |
30+
31+
A Chinese-only bug-fix revision does not need the compatibility-changes file. For a full bilingual audit, load all four.
32+
33+
## File-level structure
34+
35+
### English file (`docs/releases/release-X.X.X.md`)
36+
37+
```markdown
38+
---
39+
title: TiDB X.X.X Release Notes
40+
summary: Learn about the compatibility changes, improvements, and bug fixes in TiDB X.X.X.
41+
---
42+
43+
# TiDB X.X.X Release Notes
44+
45+
Release date: Month DD, YYYY
46+
47+
TiDB version: X.X.X
48+
49+
Quick access: [Quick start](https://docs.pingcap.com/tidb/vX.X/quick-start-with-tidb) | [Production deployment](https://docs.pingcap.com/tidb/vX.X/production-deployment-using-tiup)
50+
```
51+
52+
The `summary` value lists the sections actually present in the file, in the same order as the level-2 headings. For example, if the file includes New features, Compatibility changes, Improvements, and Bug fixes, the summary reads: `Learn about the new features, compatibility changes, improvements, and bug fixes in TiDB X.X.X.` If a section is absent, omit it from the summary.
53+
54+
### Chinese file (`docs-cn/releases/release-X.X.X.md`)
55+
56+
```markdown
57+
---
58+
title: TiDB X.X.X Release Notes
59+
summary: 了解 TiDB X.X.X 版本的兼容性变更、改进提升,以及错误修复。
60+
---
61+
62+
# TiDB X.X.X Release Notes
63+
64+
发版日期:YYYY 年 M 月 D 日
65+
66+
TiDB 版本:X.X.X
67+
68+
试用链接:[快速体验](https://docs.pingcap.com/zh/tidb/vX.X/quick-start-with-tidb) | [生产部署](https://docs.pingcap.com/zh/tidb/vX.X/production-deployment-using-tiup)
69+
```
70+
71+
### Section heading mapping
72+
73+
| English | Chinese |
74+
|---------|---------|
75+
| `## Compatibility changes` | `## 兼容性变更` |
76+
| `### Behavior changes` | `### 行为变更` |
77+
| `### System variables` | `### 系统变量` |
78+
| `### Configuration parameters` | `### 配置参数` |
79+
| `## Deprecated features` | `## 废弃功能` |
80+
| `## Improvements` | `## 改进提升` |
81+
| `## Bug fixes` | `## 错误修复` |
82+
| `## Performance test` | `## 性能测试` |
83+
| `## Contributors` | `## 贡献者` |
84+
85+
## Rules that apply to every entry
86+
87+
These rules apply to both Improvements and Bug fixes in both languages. The reference files assume these conventions.
88+
89+
### No trailing period
90+
91+
Entries do not end with `.` (English) or `` (Chinese).
92+
93+
### Write from the user's perspective
94+
95+
Describe what the user observes, not what the code does.
96+
97+
- Bug fixes: start from the GitHub issue description (user-facing symptoms). Avoid exposing internal function or variable names.
98+
- Improvements: use the GitHub PR as a reference, but reframe the entry in terms of user benefit (performance, stability, or capability).
99+
- A complete bug fix describes both the trigger condition and the observed impact. A complete improvement explains what changed and why it benefits the user.
100+
101+
### Inline code
102+
103+
Use backticks for:
104+
105+
- Variable names: `` `tidb_mem_quota_analyze` ``
106+
- Config parameters: `` `raftstore.inspect-interval` ``, command-line flags: `` `--ignore-stats` ``
107+
- SQL keywords in ALL CAPS: `` `HAVING` ``, `` `COUNT DISTINCT` ``, `` `ORDER BY` ``
108+
- SQL functions in ALL CAPS with parentheses: `` `DATE()` ``, `` `STR_TO_DATE()` ``, `` `COUNT()` ``
109+
- Exact error message strings: `` `Can't find a proper physical plan for this query` ``
110+
- Operator or plan names: `` `IndexHashJoin` ``, `` `MPP` ``
111+
- Literal values, ports, sizes: `` `8123` ``, `` `"8KiB"` ``, `` `false` ``
112+
113+
Do not wrap product or component names in prose (TiDB, TiKV, PD, TiFlash, TiCDC), or generic nouns such as "query," "table," or "index," unless referring to a specific named object.
114+
115+
### Entry suffix
116+
117+
Each improvement and bug-fix entry ends with issue link(s) and contributor, in the following format:
118+
119+
```
120+
[#NNNNN](https://github.com/org/repo/issues/NNNNN) @[contributor](https://github.com/contributor)
121+
```
122+
123+
For multiple issues in one entry: `[#NNNNN](https://github.com/pingcap/tidb/issues/NNNNN) [#MMMMM](https://github.com/pingcap/tidb/issues/MMMMM) @[contributor](https://github.com/contributor)`
124+
125+
## Quick reference
126+
127+
### English bug-fix templates
128+
129+
```
130+
- Fix the issue that [subject] [verb phrase]
131+
- Fix the issue that [subject] might [crash/panic/get stuck/return incorrect results]
132+
- Fix the issue of [noun phrase] that occurs when [condition]
133+
- Fix the [incorrect/inaccurate] [noun]
134+
- Fix a [rare/potential] issue that [description]
135+
- Fix the potential [panic/crash] that occurs when [condition]
136+
- Fix the panic issue caused by [X]
137+
```
138+
139+
### Chinese bug-fix templates
140+
141+
```
142+
- 修复 [X] 的问题
143+
- 修复 [X] 可能 [崩溃/panic/卡住/报错/返回错误结果] 的问题
144+
- 修复 [X] 导致 [Y] 的问题
145+
```
146+
147+
### Improvement opening verbs
148+
149+
English: `Support`, `Add`, `Optimize`, `Improve`, `Avoid`, `Enhance`, `Mitigate`, `Accelerate`, `Remove`, `Increase`
150+
151+
Chinese: `支持``新增``优化``提升``避免``改进``引入``增加`
152+
153+
For verb selection guidance and examples, see [references/improvements.md](references/improvements.md).
154+
155+
### Compatibility change-type vocabulary
156+
157+
| English | Chinese |
158+
|---------|---------|
159+
| `Newly added` | `新增` |
160+
| `Modified` | `修改` |
161+
| `Deprecated` | `废弃` |
162+
| `Deleted` | `删除` |
163+
164+
Component names in section headers are identical in English and Chinese: `TiDB`, `TiKV`, `PD`, `TiFlash`, `TiDB Lightning`, `BR`, `TiCDC`.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Bilingual alignment and translation
2+
3+
Use this file for checking English/Chinese alignment of a paired release note file, translating entries in either direction, or auditing alignment by issue number. The cross-cutting rules in SKILL.md apply here too.
4+
5+
## Contents
6+
7+
- Alignment checklist
8+
- Revision workflow
9+
- English to Chinese translation
10+
- Chinese to English translation
11+
12+
## Alignment checklist
13+
14+
### Must-be-identical items (no translation needed)
15+
16+
- Issue/PR numbers and URLs: `[#NNNNN](https://github.com/pingcap/tidb/issues/NNNNN)`
17+
- Contributor handles and URLs: `@[contributor](https://github.com/contributor)`
18+
- Inline code spans: `` `variable_name` ``, `` `COMMAND` ``, `` `--flag` ``
19+
- Component names in section headers: `TiDB`, `TiKV`, `PD`, `TiFlash`, `BR`, `TiCDC`, `TiDB Lightning`
20+
- Version numbers: `v7.5.0`, `v8.1.0`
21+
22+
### Anchor suffix convention
23+
24+
- English anchor for new variables/parameters: `#var_name-new-in-vXYZ`
25+
- Chinese anchor for new variables/parameters: `#var_name-从-vXYZ-版本开始引入`
26+
- Both link to the same doc page; only the anchor fragment differs
27+
- Pre-existing variables (not new in this version): no suffix in either language — just `#var_name`
28+
29+
### Section presence parity
30+
31+
- Each English section must have an exact Chinese counterpart.
32+
- Example: If the English file has `### Behavior changes`, the Chinese file must have `### 行为变更`.
33+
- Treat missing sections as defects. See SKILL.md for section heading mappings.
34+
35+
### Table parity
36+
37+
- English and Chinese compatibility tables must have:
38+
39+
- Same number of rows
40+
- Same row order
41+
- Same variable/parameter names
42+
- Matching change-type translations (`Newly added``新增`, `Modified``修改`, etc.)
43+
44+
### Note block punctuation
45+
46+
- English: `> **Note:**` (ASCII colon, no space after `**`)
47+
- Chinese: `> **注意:**` (full-width colon ``, inside the bold span)
48+
49+
### Contributors section
50+
51+
- English first-time contributor tag: `- [handle](url) (First-time contributor)`
52+
- Chinese first-time contributor tag: `- [handle](url)(首次贡献者)` (full-width parentheses)
53+
54+
## Revision workflow
55+
56+
### Reviewing an existing entry
57+
58+
1. Identify the section (Compatibility changes, Improvements, or Bug fixes) and load the corresponding reference file
59+
2. Check the opening pattern against section rules
60+
3. Verify trailing punctuation (no `.` in English; no `` in Chinese)
61+
4. Verify inline code spans for all technical terms: variables, configs, SQL keywords/functions, error messages
62+
5. Verify the issue link and contributor link at the end of the line
63+
6. For Chinese entries: verify `修复` as the opening verb for bug fixes, or an approved opening verb for improvements
64+
65+
### Writing a new entry from a PR or issue description
66+
67+
1. Read the PR title and description. For bug fixes, prioritize the linked GitHub Issue (user-facing symptoms) over the PR diff (code changes)
68+
2. Identify the component (TiDB, TiKV, PD, TiFlash, BR, TiCDC, TiDB Lightning)
69+
3. Draft the English entry:
70+
- Bug fix: `Fix the issue that [concise repro condition and observed symptom] [#NNNNN](https://github.com/pingcap/tidb/issues/NNNNN) @[contributor](https://github.com/contributor)`
71+
- Improvement: `[Action verb] [what was improved, added, or supported] [#NNNNN](https://github.com/pingcap/tidb/issues/NNNNN) @[contributor](https://github.com/contributor)` — for approved opening verbs and usage guidance, see [improvements.md](improvements.md)
72+
4. Draft the Chinese entry with the matching pattern
73+
5. Verify issue numbers match exactly between English and Chinese
74+
6. Verify the anchor suffix format if you include documentation links
75+
76+
## English to Chinese translation
77+
78+
1. Identify if the entry is a bug fix or improvement
79+
2. Map the opening verb/phrase:
80+
- `Fix the issue that X``修复 [X 的中文表述] 的问题`
81+
- `Fix the issue that X might Y``修复 [X] 可能 [Y] 的问题`
82+
- `Fix the issue of X that occurs when Y``修复 [Y] 时 [X] 的问题`
83+
- `Improve/Optimize/Support/Add/Avoid X``优化/支持/新增/避免 [X 的中文表述]`
84+
3. Keep all inline code unchanged
85+
4. Keep all issue links and contributor links unchanged
86+
5. Update doc anchor suffixes: `-new-in-vXYZ``-从-vXYZ-版本开始引入`
87+
6. Do not add a trailing period
88+
89+
## Chinese to English translation
90+
91+
1. Identify the pattern:
92+
- `修复 [X] 的问题``Fix the issue that [X in English]`
93+
- `修复 [X] 可能 [Y] 的问题``Fix the issue that [X in English] might [Y in English]`
94+
- `修复 [X] 导致 [Y] 的问题``Fix the issue that [X] causes [Y]`
95+
- Chinese improvement verb maps to the corresponding English action verb (see improvements.md)
96+
2. Keep all inline code unchanged
97+
3. Keep all issue links and contributor links unchanged
98+
4. Update doc anchor suffixes: `-从-vXYZ-版本开始引入``-new-in-vXYZ`
99+
5. Do not add a trailing period
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Bug fixes
2+
3+
Rules for the `## Bug fixes` / `## 错误修复` section. The cross-cutting rules in SKILL.md (no trailing period, user perspective, inline-code conventions, and entry suffix) also apply here.
4+
5+
The section structure is identical to Improvements: use `+` for component groups and `-` for entries, with tools nested one level deeper under `+ Tools`. See [improvements.md](improvements.md) for the structure skeleton.
6+
7+
## Contents
8+
9+
- English style rules and templates
10+
- Handling non-deterministic failures (`might` vs `potential`)
11+
- Chinese style rules and templates
12+
- Anti-patterns for both languages
13+
14+
## English style rules
15+
16+
Lead with a fix verb phrase. Use the following accepted patterns, which are listed roughly by frequency in published v6.1+ notes:
17+
18+
- `Fix the issue that [subject] [verb phrase]` (dominant modern pattern)
19+
- `Fix the issue of [noun phrase] that occurs when/during [condition]` (result-first phrasing)
20+
- `Fix the issue of [noun phrase]` (noun-centric, no trigger clause)
21+
- `Fix the [incorrect/inaccurate] [noun]` (standalone, for example, `Fix the incorrect error message ...`)
22+
- `Fix a [rare/potential] issue that [description]` (rare or non-deterministic bugs)
23+
- `Fix the potential/occasional [panic/crash] that occurs when [condition]` (specific crash scenarios)
24+
- `Fix the panic issue caused by [X]` (panic identified by cause)
25+
26+
A complete entry should include three elements: the trigger condition (when it happens), the observed impact (what the user sees), and optionally a workaround.
27+
28+
Wrap exact error messages in backticks: `Fix the issue that TiDB Lightning reports` `` `no database selected` `` `during data import`.
29+
30+
### Handling non-deterministic failures
31+
32+
Both `might` and `potential` are acceptable. Use them as follows:
33+
34+
- Use `might` as an inline modal verb: `Fix the issue that TiDB might crash when ...`
35+
- Use `potential` as an adjective before a noun: `Fix the potential panic that occurs when ...`
36+
- Do not use `may` or `could`.
37+
38+
### English examples (from v7.5.0 and v8.1.0)
39+
40+
```
41+
- Fix the issue that executing SQL statements containing tables with multi-valued indexes might return the `Can't find a proper physical plan for this query` error [#49438](...) @[qw4990](https://github.com/qw4990)
42+
- Fix the issue that automatic statistics collection gets stuck after an OOM error occurs [#51993](...) @[hi-rustin](https://github.com/hi-rustin)
43+
- Fix the issue that after using BR to restore a table that has no statistics, the statistics health of that table is still 100% [#29769](...) @[winoros](https://github.com/winoros)
44+
- Fix the issue that TiDB might crash when `tidb_mem_quota_analyze` is enabled and the memory used by updating statistics exceeds the limit [#52601](...) @[hawkingrei](https://github.com/hawkingrei)
45+
- Fix the incorrect error message displayed when an invalid default value is specified for a column [#51592](...) @[danqixu](https://github.com/danqixu)
46+
- Fix a rare issue that special event timing might cause the data loss in log backup [#16739](...) @[YuJuncen](https://github.com/YuJuncen)
47+
- Fix the panic issue caused by `GetAdditionalInfo` [#8079](...) @[HuSharp](https://github.com/HuSharp)
48+
- Fix the issue that inactive Write Ahead Logs (WALs) in RocksDB might corrupt data [#16705](...) @[Connor1996](https://github.com/Connor1996)
49+
- Fix the issue that the MySQL compression protocol cannot handle large loads of data (>=16M) [#47152](...) [#47157](...) [#47161](...) @[dveeden](https://github.com/dveeden)
50+
```
51+
52+
### English anti-patterns
53+
54+
| Incorrect | Correct |
55+
|-----------|---------|
56+
| `Fixed the issue that ...` (past tense) | `Fix the issue that ...` (imperative) |
57+
| `Fixes an issue where ...` | `Fix the issue that ...` |
58+
| `Fix the issue where ...` | `Fix the issue that ...` (use `that`, not `where`) |
59+
| `Fix the issue that ... may ...` | Use `might` or `potential` |
60+
| Entry ends with `.` | Remove the period |
61+
| `Fix nil pointer panic in getRegionFromTS` (internal function name) | Rewrite to user-observable behavior: `Fix the potential panic that occurs when fetching region information during a Stale Read` |
62+
| `The issue of X causing Y is fixed` | `Fix the issue that X causes Y` |
63+
64+
## Chinese style rules
65+
66+
Lead with `修复` for most entries. The standard templates are:
67+
68+
- `修复 [X] 的问题` (most common)
69+
- `修复 [X] 可能 [崩溃/panic/卡住/报错] 的问题` (non-deterministic failures)
70+
- `修复 [X] 导致 [Y] 的问题` (cause-effect issues)
71+
- `禁止 [X]` (used when the fix introduces a restriction rather than a repair; rare)
72+
73+
Close the description clause with `的问题`. Use `可能` for non-deterministic failures, consistent with the English use of `might`. Do not add `` at the end.
74+
75+
### Chinese examples (from v7.5.0 and v8.1.0)
76+
77+
```
78+
- 修复 Sort 算子在落盘过程中可能导致 TiDB 崩溃的问题 [#47538](...) @[windtalker](https://github.com/windtalker)
79+
- 修复 HashJoin 算子 Probe 时无法复用 chunk 的问题 [#48082](...) @[wshwsh12](https://github.com/wshwsh12)
80+
- 修复 `COALESCE()` 函数对于 `DATE` 类型参数返回结果类型不正确的问题 [#46475](...) @[xzhangxian1008](https://github.com/xzhangxian1008)
81+
- 修复 `client-go` 中 `batch-client` panic 的问题 [#47691](...) @[crazycs520](https://github.com/crazycs520)
82+
- 修复 MySQL 压缩协议无法处理超大负载数据 (>= 16M) 的问题 [#47152](...) [#47157](...) [#47161](...) @[dveeden](https://github.com/dveeden)
83+
- 禁止非整型聚簇索引进行 split table 操作 [#47350](...) @[tangenta](https://github.com/tangenta)
84+
- 修复采用自适应同步部署模式 (DR Auto-Sync) 的集群在 Placement Rule 的配置较复杂时,`canSync` 和 `hasMajority` 可能计算错误的问题 [#7201](...) @[disksing](https://github.com/disksing)
85+
```
86+
87+
### Chinese anti-patterns
88+
89+
| Incorrect | Correct |
90+
|-----------|---------|
91+
| `修复了 ...` (with ``) | `修复 ...` (remove ``) |
92+
| Entry ends with `` | Remove `` |
93+
| `修复 ... 的 bug` | `修复 ... 的问题` |
94+
| `解决了 ...` | `修复 ...` |

0 commit comments

Comments
 (0)