-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: configs of max-ts checker #19380
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: ekexium <eke@fastmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -503,27 +503,6 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con | |||||
> - 由于 API V1 和 API V2 底层存储格式不同,因此**仅当** TiKV 中只有 TiDB 数据时,可以平滑启用或关闭 API V2。其他情况下,需要新建集群,并使用 [TiKV Backup & Restore](https://tikv.org/docs/latest/concepts/explore-tikv-features/backup-restore-cn/) 工具进行数据迁移。 | ||||||
> - 启用 API V2 后,**不能**将 TiKV 集群回退到 v6.1.0 之前的版本,否则可能导致数据损坏。 | ||||||
|
||||||
### `max-ts-drift-allowance` | ||||||
|
||||||
+ 读写请求更新 max-ts 时允许超过 TiKV 缓存的 PD TSO 的最大值。 | ||||||
+ 如果尝试更新的 max-ts 超过 TiKV 缓存的 PD TSO + allowance,认为该请求的来源不合法,会执行 [`action-on-invalid-max-ts`](#action-on-invalid-max-ts) 规定的行为。如果 TiKV 的缓存 PD TSO 没有及时更新,会使用近似方法判断,此时被判定为非法的情况不会导致 panic。 | ||||||
+ 默认值:60s | ||||||
+ 建议设置为[`max-ts-sync-interval`](#max-ts-sync-interval)的 3 倍以上。 | ||||||
|
||||||
### `max-ts-sync-interval` | ||||||
|
||||||
+ TiKV 更新 PD TSO 缓存的时间间隔。该缓存用于检查 max-ts 更新的合法性。 | ||||||
+ 默认值:15s | ||||||
|
||||||
### `action-on-invalid-max-ts` | ||||||
|
||||||
+ 当 TiKV 认为更新的 max-ts 不合法时,TiKV 会执行的操作。非法的 `max-ts` 可能导致 TiDB 集群线性一致性和事务并发控制语义被破坏。 | ||||||
+ 可选值: | ||||||
+ `"panic"`:TiKV 会 panic。 | ||||||
+ `"error"`:TiKV 会将错误返回。 | ||||||
+ `"log"`:TiKV 会打印 error 日志并继续执行。 | ||||||
+ 默认值:`"panic"` | ||||||
|
||||||
## storage.block-cache | ||||||
|
||||||
RocksDB 多个 CF 之间共享 block cache 的配置选项。 | ||||||
|
@@ -582,6 +561,29 @@ I/O rate limiter 相关的配置项。 | |||||
+ 可选值:`"read-only"`,`"write-only"`,`"all-io"` | ||||||
+ 默认值:`"write-only"` | ||||||
|
||||||
## `storage.max-ts` | ||||||
|
||||||
### `max-drift` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
+ 读写请求更新 max-ts 时允许超过 TiKV 缓存的 PD TSO 的最大值。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 搜了下,文档里其他地方都没有介绍过 max-ts 是什么,因此这里需要介绍下,或者用中文含义代替 |
||||||
+ 如果尝试更新的 max-ts 超过 TiKV 缓存的 PD TSO + `max-drift`,认为该请求的来源不合法,会执行 [`action-on-invalid-update`](#action-on-invalid-update) 规定的行为。如果 TiKV 的缓存 PD TSO 没有及时更新,会使用近似方法判断,此时被判定为非法的情况不会导致 panic。 | ||||||
+ 默认值:60s | ||||||
+ 建议设置为[`cache-sync-interval`](#cache-sync-interval)的 3 倍以上。 | ||||||
|
||||||
### `cache-sync-interval` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
+ TiKV 更新 PD TSO 缓存的时间间隔。该缓存用于检查 max-ts 更新的合法性。 | ||||||
+ 默认值:15s | ||||||
|
||||||
### `action-on-invalid-update` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
+ 当 TiKV 认为更新的 max-ts 不合法时,TiKV 会执行的操作。非法的 `max-ts` 可能导致 TiDB 集群线性一致性和事务并发控制语义被破坏。 | ||||||
+ 可选值: | ||||||
+ `"panic"`:TiKV 会 panic。 | ||||||
+ `"error"`:TiKV 会将错误返回。 | ||||||
+ `"log"`:TiKV 会打印 error 日志并继续执行。 | ||||||
+ 默认值:`"panic"` | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一般情况下,这 3 个配置项请按字母顺序排列
|
||||||
## pd | ||||||
|
||||||
### `enable-forwarding` <span class="version-mark">从 v5.0.0 版本开始引入</span> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要加一句话介绍这个配置项组的作用