Clarify TiKV large-row limit in transaction restraints (#21830)#21834
Conversation
📝 WalkthroughWalkthrough事务限制文档新增 TiKV 单次写入请求大小限制,说明超出默认阈值时请求会被拒绝,并要求大单行记录同步调整 TiDB 与 TiKV 配置。 Changes事务限制文档
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
/approve |
There was a problem hiding this comment.
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
📒 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`。 |
There was a problem hiding this comment.
🎯 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 可提交建议块。
| - 注意,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
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is an automated cherry-pick of #21830
What is changed, added or deleted? (Required)
Clarify in
develop/dev-guide-transaction-restraints.mdthat increasing the large-row limit in TiDB is not sufficient by itself. When a single write request exceeds TiKVraftstore.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).
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit