gc stale peer #804
Labels
sig/raft
Component: Raft, RaftStore, etc.
type/enhancement
The issue or PR belongs to an enhancement.
Milestone
See https://github.com/pingcap/tikv/blob/master/src/raftstore/store/store.rs#L356
We don't handle following case now:
To handle this, if a peer has no leader for a long time (e.g, 10m, set in configuration), it will ask pd whether it is stale or not. We can save a last check time and check this in every region tick.
To ask pd, we can use pd GetRegion with region start key directly, if the returned region doesn't contain this peer, we can think the peer is stale.
Notice:
The GetRegion may return another next region if splitting. we should handle this case.
The text was updated successfully, but these errors were encountered: