diff --git a/tikv-control.md b/tikv-control.md index 84f24d5b7ed40..c3e987feffb39 100644 --- a/tikv-control.md +++ b/tikv-control.md @@ -300,7 +300,8 @@ Use the `compact` command to manually compact data of each TiKV. - Use the `--from` and `--to` options to specify the compaction range in the form of escaped raw key. If not set, the whole range will be compacted. - Use the `--region` option to compact the range of a specific region. If set, `--from` and `--to` will be ignored. -- Use the `--db` option to specify the RocksDB that performs compaction. The optional values are `kv` and `raft`. +- Use the `-c` option to specify the column family name. The default value is `default`. The optional values are `default`, `lock`, and `write`. +- Use the `-d` option to specify the RocksDB that performs compaction. The default value is `kv`. The optional values are `kv` and `raft`. - Use the `--threads` option allows you to specify the concurrency for the TiKV compaction and its default value is `8`. Generally, a higher concurrency comes with a faster compaction speed, which might yet affect the service. You need to choose an appropriate concurrency count based on your scenario. - Use the `--bottommost` option to include or exclude the bottommost files when TiKV performs compaction. The value options are `default`, `skip`, and `force`. The default value is `default`. - `default` means that the bottommost files are included only when the Compaction Filter feature is enabled. @@ -310,18 +311,21 @@ Use the `compact` command to manually compact data of each TiKV. - To compact data in the local mode, use the following command: ```shell - tikv-ctl --data-dir /path/to/tikv compact --db kv + tikv-ctl --data-dir /path/to/tikv compact -d kv ``` - To compact data in the remote mode, use the following command: ```shell - tikv-ctl --host ip:port compact --db kv + tikv-ctl --host ip:port compact -d kv ``` ### Compact data of the whole TiKV cluster manually -Use the `compact-cluster` command to manually compact data of the whole TiKV cluster. The flags of this command have the same meanings and usage as those of the `compact` command. +Use the `compact-cluster` command to manually compact data of the whole TiKV cluster. The flags of this command have the same meanings and usage as those of the `compact` command. The only difference is as follows: + +- For the `compact-cluster` command, use `--pd` to specify the address of the PD, so that `tikv-ctl` can locate all TiKV nodes in the cluster as the compact target. +- For the `compact` command, use `--data-dir` or `--host` to specify a single TiKV as the compact target. ### Set a Region to tombstone