Issues Encountered with tikv-ctl when Handling Bad SSTs

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于tikv-ctl做bad-ssts遇到的问题

| username: LBX流鼻血

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 6.1.0
[Encountered Problem: Problem Phenomenon and Impact]
I would like to ask, if multiple KV nodes use the same directory for tikvctl, which machine does this directory check?
tiup ctl:v6.1.0 tikv --data-dir /tidata/hdap/ti-kv/data-20171 bad-ssts --pd XX.XX.XX.XX:2379
I tried adding --host with a random non-existent IP, but it always gets stuck. It seems this parameter does not take effect?
tiup ctl:v6.1.0 tikv --host 1.1.1.1 --data-dir /tidata/hdap/ti-kv/data-20171 bad-ssts --pd XX.XX.XX.XX:2379

| username: tidb菜鸟一只 | Original post link

Why do different TiKVs use the same directory? Usually, the default names include the port number, and port numbers cannot be duplicated…

| username: LBX流鼻血 | Original post link

It’s the same~ different IPs

| username: h5n1 | Original post link

Why do you need to add --host? Which TiKV are you handling, and which TiKV are you logging into to execute?

| username: LBX流鼻血 | Original post link

Oh~ So it means that if you don’t add it, it will be executed on the local machine by default, right? Because it’s using the method tiup ctl:v6.1.0 tikv, if it’s a KV node, you just need to copy the binary file tikv-ctl from the control machine, right?

| username: redgame | Original post link

Yes, that’s right.

| username: 大飞哥online | Original post link

The directories are all under the tidb-deploy directory, and the tikv-port, right? One port corresponds to one, and the ports cannot be duplicated.

| username: 大飞哥online | Original post link

That’s a different physical machine. The IP of the same physical machine cannot be the same.

| username: 大飞哥online | Original post link

Mine are all on one physical machine, with different port directories.