Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <jinhao.hu@pingcap.com>
  • Loading branch information
HuSharp committed Nov 10, 2023
1 parent da0221a commit a756742
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/playground/instance/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
// PDRoleScheduling is the role of PD scheduling
PDRoleScheduling PDRole = "scheduling"
// PDRoleResourceManager is the role of PD resource manager
PDRoleResourceManager PDRole = "resource manager"
PDRoleResourceManager PDRole = "resource_manager"
)

// PDInstance represent a running pd-server
Expand Down
4 changes: 4 additions & 0 deletions components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ func (p *Playground) addInstance(componentID string, pdRole instance.PDRole, tif

id := p.allocID(componentID)
dir := filepath.Join(dataDir, fmt.Sprintf("%s-%d", componentID, id))
if componentID == string(instance.PDRoleNormal) && pdRole != instance.PDRoleNormal {
id = p.allocID(fmt.Sprintf("%s-%s", componentID, pdRole))
dir = filepath.Join(dataDir, fmt.Sprintf("%s-%s-%d", componentID, pdRole, id))
}
if err = utils.MkdirAll(dir, 0755); err != nil {
return nil, err
}
Expand Down

0 comments on commit a756742

Please sign in to comment.