根据官方文档操作具体内容如下
查看所有 KV运行情况
[tidb@test1 tidb-ansible]$ resources/bin/pd-ctl -u "http://172.160.180.46:2379" -d store
{
"count": 3,
"stores": [
{
"store": {
"id": 1,
"address": "172.160.180.46:20160",
"version": "3.0.2",
"state_name": "Up"
},
"status": {
"capacity": "118 GiB",
"available": "104 GiB",
"leader_count": 560,
"leader_weight": 1,
"leader_score": 886,
"leader_size": 886,
"region_count": 1002,
"region_weight": 1,
"region_score": 1777,
"region_size": 1777,
"start_ts": "2019-08-15T13:17:44+08:00",
"last_heartbeat_ts": "2019-08-20T09:33:59.402357092+08:00",
"uptime": "116h16m15.402357092s"
}
},
{
"store": {
"id": 4,
"address": "172.160.180.47:20160",
"version": "3.0.2",
"state_name": "Up"
},
"status": {
"capacity": "118 GiB",
"available": "112 GiB",
"leader_count": 442,
"leader_weight": 1,
"leader_score": 891,
"leader_size": 891,
"region_count": 1002,
"region_weight": 1,
"region_score": 1777,
"region_size": 1777,
"start_ts": "2019-08-15T13:17:44+08:00",
"last_heartbeat_ts": "2019-08-20T09:33:59.234494228+08:00",
"uptime": "116h16m15.234494228s"
}
},
{
"store": {
"id": 5,
"address": "172.160.180.48:20160",
"state": 1,
"version": "3.0.2",
"state_name": "Up"
},
"status": {
"leader_weight": 1,
"region_count": 589,
"region_weight": 1,
"region_score": 1113,
"region_size": 1113,
"start_ts": "1970-01-01T08:00:00+08:00"
}
}
]
}
[tidb@test1 tidb-ansible]$
停止 id:5的KV
[tidb@test1 tidb-ansible]$ resources/bin/pd-ctl -u "http://172.160.180.46:2379" -d store delete 5
Success!
[tidb@test1 tidb-ansible]$
[tidb@test1 tidb-ansible]$ resources/bin/pd-ctl -u "http://172.160.180.46:2379" -d store 5
{
"store": {
"id": 5,
"address": "172.160.180.48:20160",
"state": 1,
"version": "3.0.2",
"state_name": "Offline"
},
"status": {
"leader_weight": 1,
"region_count": 589,
"region_weight": 1,
"region_score": 1113,
"region_size": 1113,
"start_ts": "1970-01-01T08:00:00+08:00"
}
}
[tidb@test1 tidb-ansible]$
根据关文档提示如下 :
使用 Grafana 或者
pd-ctl检查节点是否下线成功(下线需要一定时间,下线节点的状态变为 Tombstone 就说明下线成功了)
问题一:
预期效果:
下线后状态变为 Tombstone
实际情况:
下线后 过了10几个小时 一直是Offline
问题二:
“start_ts”: “1970-01-01T08:00:00+08:00” 为什么会一是 1970-01-01