Skip to content

Commit

Permalink
Fix the issue that tiflash's data is not clean up (#768)
Browse files Browse the repository at this point in the history
We use ServicePort in DestroyClusterTombstone to construct id and filter by id,
but the id of instances of cluster is contract using Port(TCPPort for
	tiflash),
so it will not get the instance and clean it's data in DestroyClusterTombstone.

Note the GetMainPort() is TCPPort now, change the code to both
using GetMainPort() to avoid inconsistent.
  • Loading branch information
july2993 authored and lucklove committed Sep 11, 2020
1 parent d8f3dbe commit 94a4a72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/cluster/operation/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func DestroyClusterTombstone(
}

instances := (&spec.TiFlashComponent{Specification: cluster}).Instances()
id = s.Host + ":" + strconv.Itoa(s.GetMainPort())
instances = filterID(instances, id)

err = StopComponent(getter, instances, options.OptTimeout)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tiflash.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (c *TiFlashComponent) Instances() []Instance {
InstanceSpec: s,
Name: c.Name(),
Host: s.Host,
Port: s.TCPPort,
Port: s.GetMainPort(),
SSHP: s.SSHPort,

Ports: []int{
Expand Down

0 comments on commit 94a4a72

Please sign in to comment.