Skip to content

Commit

Permalink
Skip evict store when only 1 tikv
Browse files Browse the repository at this point in the history
Fix pingcap#661

Signed-off-by: lucklove <gnu.crazier@gmail.com>
  • Loading branch information
lucklove committed Aug 6, 2020
1 parent 80da63c commit 6429c06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cluster/spec/tikv.go
Expand Up @@ -239,6 +239,10 @@ func (i *TiKVInstance) PreRestart(topo Topology, apiTimeoutSeconds int) error {
panic("should be type of tidb topology")
}

if len(tidbTopo.TiKVServers) <= 1 {
return nil
}

pdClient := api.NewPDClient(tidbTopo.GetPDList(), 5*time.Second, nil)

// Make sure there's leader of PD.
Expand Down

0 comments on commit 6429c06

Please sign in to comment.