Skip to content

Commit

Permalink
Fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
JaySon-Huang committed Jan 10, 2024
1 parent 332dab3 commit e3e8d99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/spec/tiflash.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,16 +541,16 @@ func (i *TiFlashInstance) initTiFlashConfig(ctx context.Context, version string,
}

// `cluster_manager` is removed since v6.0.0
if tidbver.TiFlashNotNeedClusterManager(version) {
clusterManagerConfig = "#"
} else {
if tidbver.TiFlashNeedClusterManager(version) {
clusterManagerConfig = fmt.Sprintf(`
flash.flash_cluster.cluster_manager_path: "%[2]s/bin/tiflash/flash_cluster_manager"
flash.flash_cluster.log: "%[1]s/tiflash_cluster_manager.log"
flash.flash_cluster.master_ttl: 60
flash.flash_cluster.refresh_interval: 20
flash.flash_cluster.update_rule_interval: 5
`, paths.Log, paths.Deploy)
} else {
clusterManagerConfig = "#"
}

topo := Specification{}
Expand Down
6 changes: 3 additions & 3 deletions pkg/tidbver/tidbver.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ func TiFlashNotNeedSomeConfig(version string) bool {
return semver.Compare(version, "v5.4.0") >= 0 || strings.Contains(version, "nightly")
}

// TiFlashNotNeedSomeConfig return if given version of TiFlash do not need to start `cluster_manager`
func TiFlashNotNeedClusterManager(version string) bool {
return semver.Compare(version, "v6.0.0") >= 0 || strings.Contains(version, "nightly")
// TiFlashNeedClusterManager return if given version of TiFlash do not need to start `cluster_manager`
func TiFlashNeedClusterManager(version string) bool {
return semver.Compare(version, "v6.0.0") < 0 && !strings.Contains(version, "nightly")
}

// TiFlashPlaygroundNewStartMode return true if the given version of TiFlash could be started
Expand Down

0 comments on commit e3e8d99

Please sign in to comment.