Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 4 commits
Commits
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
23 changes: 23 additions & 0 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,29 @@ I/O rate limiter 相关的配置项。
+ 可选值:`"read-only"`,`"write-only"`,`"all-io"`
+ 默认值:`"write-only"`

## `storage.max-ts`

qiancai marked this conversation as resolved.
Show resolved Hide resolved
### `max-drift`
ekexium marked this conversation as resolved.
Show resolved Hide resolved

+ 读写请求更新 max-ts 时允许超过 TiKV 缓存的 PD TSO 的最大值。
ekexium marked this conversation as resolved.
Show resolved Hide resolved
+ 如果尝试更新的 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`
ekexium marked this conversation as resolved.
Show resolved Hide resolved

+ TiKV 更新 PD TSO 缓存的时间间隔。该缓存用于检查 max-ts 更新的合法性。
+ 默认值:15s

### `action-on-invalid-update`
ekexium marked this conversation as resolved.
Show resolved Hide resolved

+ 当 TiKV 认为更新的 max-ts 不合法时,TiKV 会执行的操作。非法的 `max-ts` 可能导致 TiDB 集群线性一致性和事务并发控制语义被破坏。
ekexium marked this conversation as resolved.
Show resolved Hide resolved
+ 可选值:
+ `"panic"`:TiKV 会 panic。
ekexium marked this conversation as resolved.
Show resolved Hide resolved
+ `"error"`:TiKV 会将错误返回。
+ `"log"`:TiKV 会打印 error 日志并继续执行。
ekexium marked this conversation as resolved.
Show resolved Hide resolved
+ 默认值:`"panic"`

qiancai marked this conversation as resolved.
Show resolved Hide resolved
## pd

### `enable-forwarding` <span class="version-mark">从 v5.0.0 版本开始引入</span>
Expand Down
Loading