Skip to content

Commit

Permalink
revert default port
Browse files Browse the repository at this point in the history
Signed-off-by: xhe <[email protected]>
  • Loading branch information
xhebox committed Aug 21, 2023
1 parent 468f83d commit 94edc9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions components/playground/instance/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ type TiDBInstance struct {
}

// NewTiDBInstance return a TiDBInstance
func NewTiDBInstance(binPath string, dir, host, configPath string, id, port int, pds []*PDInstance, enableBinlog bool, isDisaggMode bool, tiproxys []*TiProxy) *TiDBInstance {
func NewTiDBInstance(binPath string, dir, host, configPath string, id, port int, pds []*PDInstance, enableBinlog bool, isDisaggMode bool) *TiDBInstance {
if port <= 0 {
if len(tiproxys) > 0 {
port = 6000
} else {
port = 4000
}
port = 4000
}
return &TiDBInstance{
instance: instance{
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var _ Instance = &TiProxy{}
// NewTiProxy create a TiProxy instance.
func NewTiProxy(binPath string, dir, host, configPath string, id int, port int, pds []*PDInstance) *TiProxy {
if port <= 0 {
port = 4000
port = 6000
}
tiproxy := &TiProxy{
instance: instance{
Expand Down
2 changes: 1 addition & 1 deletion components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func (p *Playground) addInstance(componentID string, pdRole instance.PDRole, tif
p.pds = append(p.pds, inst)
}
case spec.ComponentTiDB:
inst := instance.NewTiDBInstance(cfg.BinPath, dir, host, cfg.ConfigPath, id, cfg.Port, p.pds, p.enableBinlog(), p.bootOptions.Mode == "tidb-disagg", p.tiproxys)
inst := instance.NewTiDBInstance(cfg.BinPath, dir, host, cfg.ConfigPath, id, cfg.Port, p.pds, p.enableBinlog(), p.bootOptions.Mode == "tidb-disagg")
ins = inst
p.tidbs = append(p.tidbs, inst)
case spec.ComponentTiKV:
Expand Down

0 comments on commit 94edc9a

Please sign in to comment.