File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,19 @@ key: zmDB:29\000\000\377\000\374\000\000\000\000\000\000\377\000H\000\000\000\00
8888
8989打印某个 key 的值需要用到 ` print ` 命令。示例从略。
9090
91- ### 手动 compact 数据
91+ ### 手动 compact 单个 TiKV 的数据
9292
93- ` compact ` 命令可以对 TiKV 进行手动 compact。如果指定 ` -from ` 和 ` --to ` 选项,那么它们的参数也是 escaped raw key 形式的。` --db ` 参数可以指定要 compact 的 RocksDB,有 ` kv ` 和 ` raft ` 参数值可以选。
93+ ` compact ` 命令可以对单个 TiKV 进行手动 compact。如果指定 ` -- from ` 和 ` --to ` 选项,那么它们的参数也是 escaped raw key 形式的。` --db ` 参数可以指定要 compact 的 RocksDB,有 ` kv ` 和 ` raft ` 参数值可以选。 ` --threads ` 参数可以指定 compact 的并发数,默认值是 8。一般来说,并发数越大, compact 的速度越快,但是也会对服务造成影响,所以需要根据情况选择合适的并发数 。
9494
9595``` bash
9696$ tikv-ctl --db /path/to/tikv/db compact -d kv
9797success!
9898```
9999
100+ ### 手动 compact 整个 TiKV 集群的数据
101+
102+ ` compact-cluster ` 命令可以对整个 TiKV 集群进行手动 compact。该命令参数的含义和使用与 ` compact ` 命令一样。
103+
100104### 设置一个 Region 为 tombstone
101105
102106` tombstone ` 命令常用于没有开启 sync-log,因为机器掉电导致 Raft 状态机丢失部分写入的情况。它可以在一个 TiKV 实例上将一些 Region 设置为 Tombstone 状态,从而在重启时跳过那些 Region。而那些 Region 应该在其他 TiKV 上有足够多的健康的副本以便能够继续通过 Raft 机制进行读写。
You can’t perform that action at this time.
0 commit comments