Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: Current ID allocation 除了从监控中和PD日志中获取,还能再别的地方获取到吗
【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
【Encountered Issue: Issue Symptoms and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】
With ETCD, it will be more complicated…
The prerequisite is that the PD leader is not down…
Check the region ID allocation, add a 1 to the highest bit, this way it shouldn’t conflict.
Okay, give it a try, it might not work very well.
Then you can only look for it in the logs. If you can’t find it, just create a larger ID yourself…
I haven’t had the chance to practice in the environment yet.
Every PD log has it, so it is guaranteed not to be lost.
Reference:
Method 1:
cat /u01/tidb/deploy/pd-2379/log/pd.log | grep "init cluster id"
[2024/01/17 11:49:47.039 +08:00] [INFO] [server.go:346] ["init cluster id"] [cluster-id=7212470665861270901]
Method 2:
tiup ctl:v6.5.7 pd -u ip:port store --jq=".stores[] | {id: .store.id, address: .store.address, state_name: .store.state_name, capacity: .status.capacity, available: .status.available, region_count: .status.region_count}"
If there were logs, I wouldn’t be asking.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.