Skip to content

Commit

Permalink
Describe auto_id_cache = 0 behavior and add link how to address TiKV_…
Browse files Browse the repository at this point in the history
…pending_task alert (#13892) (#13937)
  • Loading branch information
ti-chi-bot authored May 11, 2023
1 parent 458657b commit f6c10c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alert-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ summary: TiDB 集群中各组件的报警规则详解。

* 处理方法:

查看是哪一类任务的值偏高,通常 Coprocessor、apply worker 这类任务都可以在其他指标里找到解决办法
观察 [**TiKV-Details** > **Task** 面板](/grafana-tikv-dashboard.md#task),查看是哪一类任务的 `Worker pending tasks` 值偏高

#### `TiKV_low_space`

Expand Down
1 change: 1 addition & 0 deletions auto-increment.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ CREATE TABLE t(a int AUTO_INCREMENT key) AUTO_ID_CACHE 1;
>
> - 对于 TiDB v6.4.0 之前的版本,由于每次分配 ID 都需要通过一个 TiKV 事务完成 `AUTO_INCREMENT` 值的持久化修改,因此设置 `AUTO_ID_CACHE``1` 会出现性能下降。
> - 对于 v6.4.0 及以上版本,由于引入了中心化的分配服务,`AUTO_INCREMENT` 值的修改只是在 TiDB 服务进程中的一个内存操作,相较于之前版本更快。
> -`AUTO_ID_CACHE` 设置为 `1` 表示 TiDB 使用默认的缓存大小 `30000`
使用 MySQL 兼容模式后,能保证 ID **唯一****单调递增**,行为几乎跟 MySQL 完全一致。即使跨 TiDB 实例访问,ID 也不会出现回退。只有当中心化服务的“主” TiDB 实例异常崩溃时,才有可能造成少量 ID 不连续。这是因为主备切换时,“备” 节点需要丢弃一部分之前的“主” 节点可能已经分配的 ID,以保证 ID 不出现重复。

Expand Down

0 comments on commit f6c10c9

Please sign in to comment.