Skip to content

Clarify TiKV large-row limit in transaction restraints (#21830)#21834

Merged
ti-chi-bot[bot] merged 3 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-21830-to-release-8.5
Jul 23, 2026
Merged

Clarify TiKV large-row limit in transaction restraints (#21830)#21834
ti-chi-bot[bot] merged 3 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-21830-to-release-8.5

Conversation

@ti-chi-bot

@ti-chi-bot ti-chi-bot commented Jul 23, 2026

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #21830

What is changed, added or deleted? (Required)

Clarify in develop/dev-guide-transaction-restraints.md that increasing the large-row limit in TiDB is not sufficient by itself. When a single write request exceeds TiKV raftstore.raft-entry-max-size, TiKV rejects the request, so users need to adjust the TiKV limit together with the TiDB row-size limit.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

What is the related PR or file link(s)?

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • 文档
    • 在事务限制指南中补充单次写入请求大小限制说明。
    • 说明当单行记录较大时,需同步调整 TiDB 与 TiKV 的相关配置。

@ti-chi-bot ti-chi-bot added area/develop This PR relates to the area of TiDB App development. contribution This PR is from a community contributor. lgtm size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

事务限制文档新增 TiKV 单次写入请求大小限制,说明超出默认阈值时请求会被拒绝,并要求大单行记录同步调整 TiDB 与 TiKV 配置。

Changes

事务限制文档

Layer / File(s) Summary
新增写入请求大小限制说明
develop/dev-guide-transaction-restraints.md
补充 raftstore.raft-entry-max-size 的默认值、超限行为,以及大单行记录需同步调整 tidb_txn_entry_size_limit 和该 TiKV 配置的说明。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • pingcap/docs-cn#21830:修改同一事务限制文档章节,说明 TiKV 写入请求大小限制及大单行记录的相关配置。

Suggested labels: requires-version-specific-changes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed 标题与变更一致,准确概括了事务限制文档中对 TiKV 大行限制的澄清。
Description check ✅ Passed 描述包含变更内容、适用版本、关联链接、AI 参与和版本适配提示,整体符合模板要求。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiancai

qiancai commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

/approve

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3c6747df-bbb4-4dff-87da-3f5c036cbdc8

📥 Commits

Reviewing files that changed from the base of the PR and between 02a5daa and 3cefe8b.

📒 Files selected for processing (1)
  • develop/dev-guide-transaction-restraints.md


- TiDB v4.0.10 及更高的 v4.0.x 版本、v5.0.0 及更高的版本可通过 tidb-server 配置项 [`performance.txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-从-v4010-和-v500-版本开始引入) 调整,低于 TiDB v4.0.10 的版本支持的单行容量为 6 MiB。
- 从 v7.6.0 开始,你可以使用 [`tidb_txn_entry_size_limit`](/system-variables.md#tidb_txn_entry_size_limit-从-v760-版本开始引入) 系统变量动态修改该配置项的值。
- 注意,TiKV 对单个写入请求的数据量大小也有限制。若单个写入请求的数据量超出 [`raftstore.raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size)(默认值为 8 MiB),TiKV 会拒绝处理该请求。当单行记录较大时,需要同时调整 TiDB 的 `tidb_txn_entry_size_limit` 和 TiKV 的 `raftstore.raft-entry-max-size`。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

兼容 v7.6.0 之前的版本

当前表述只要求调整 tidb_txn_entry_size_limit,但该系统变量从 v7.6.0 才引入;本 PR 覆盖的 7.5、7.1 和 6.5 用户无法按此说明配置 TiDB。请同时说明旧版本使用 performance.txn-entry-size-limit,并保留新版本的动态调整方式。

As per path instructions:对于 Markdown 文件,能够安全替换连续变更行时必须提供 GitHub 可提交建议块。

Suggested change
- 注意,TiKV 对单个写入请求的数据量大小也有限制。若单个写入请求的数据量超出 [`raftstore.raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size)(默认值为 8 MiB),TiKV 会拒绝处理该请求。当单行记录较大时,需要同时调整 TiDB 的 `tidb_txn_entry_size_limit` 和 TiKV 的 `raftstore.raft-entry-max-size`。
- 注意,TiKV 对单个写入请求的数据量大小也有限制。若单个写入请求的数据量超出 [`raftstore.raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size)(默认值为 8 MiB),TiKV 会拒绝处理该请求。当单行记录较大时,需要同时调整 TiDB 的 [`performance.txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-从-v4010-和-v500-版本开始引入) 和 TiKV 的 [`raftstore.raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size);从 v7.6.0 开始,也可以通过 [`tidb_txn_entry_size_limit`](/system-variables.md#tidb_txn_entry_size_limit-从-v760-版本开始引入) 动态调整 TiDB 的限制

Source: Path instructions

@ti-chi-bot

ti-chi-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiancai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Jul 23, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 5325c51 into pingcap:release-8.5 Jul 23, 2026
11 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the cherry-pick-21830-to-release-8.5 branch July 23, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved area/develop This PR relates to the area of TiDB App development. contribution This PR is from a community contributor. lgtm size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bugfix This PR fixes a bug. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants