From b87033cc4391839a51f5a12f6b3e788fa1e1d56c Mon Sep 17 00:00:00 2001 From: ruoxi Date: Mon, 17 Jul 2023 16:30:46 +0800 Subject: [PATCH] cluster: fix cannot start tiflash above 7.1.0 (#2230) --- pkg/cluster/spec/tiflash.go | 2 +- pkg/tidbver/tidbver.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/spec/tiflash.go b/pkg/cluster/spec/tiflash.go index 8f6aa19b06..0a92f14f38 100644 --- a/pkg/cluster/spec/tiflash.go +++ b/pkg/cluster/spec/tiflash.go @@ -881,7 +881,7 @@ func (i *TiFlashInstance) PrepareStart(ctx context.Context, tlsCfg *tls.Config) func (i *TiFlashInstance) Ready(ctx context.Context, e ctxt.Executor, timeout uint64, tlsCfg *tls.Config) error { // FIXME: the timeout is applied twice in the whole `Ready()` process, in the worst // case it might wait double time as other components - if err := PortStarted(ctx, e, i.Port, timeout); err != nil { + if err := PortStarted(ctx, e, i.GetServicePort(), timeout); err != nil { return err } diff --git a/pkg/tidbver/tidbver.go b/pkg/tidbver/tidbver.go index ff1d263426..5310b6a5c1 100644 --- a/pkg/tidbver/tidbver.go +++ b/pkg/tidbver/tidbver.go @@ -72,7 +72,7 @@ func TiFlashNotNeedHTTPPortConfig(version string) bool { // and we must make sure the port is being configured as specified in the topology file, // otherwise multiple TiFlash instances will conflict. func TiFlashRequiresTCPPortConfig(version string) bool { - return semver.Compare(version, "v7.1.0") < 0 + return semver.Compare(version, "v7.1.0") < 0 && !strings.Contains(version, "nightly") } // TiFlashNotNeedSomeConfig return if given version of TiFlash do not need some config like runAsDaemon