Skip to content

Commit

Permalink
fix: fix slice init length (#5757)
Browse files Browse the repository at this point in the history
Co-authored-by: cui fliter <[email protected]>
  • Loading branch information
ti-chi-bot and cuishuang authored Oct 8, 2024
1 parent aa67a48 commit 177773b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/autoscaler/autoscaler/pdplan_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
const groupLabelKey = "group"

func (am *autoScalerManager) getAutoScaledClusters(tac *v1alpha1.TidbClusterAutoScaler, components []v1alpha1.MemberType) (tcList []*v1alpha1.TidbCluster, err error) {
componentStrings := make([]string, len(components))
componentStrings := make([]string, 0, len(components))
for _, component := range components {
componentStrings = append(componentStrings, component.String())
}
Expand Down

0 comments on commit 177773b

Please sign in to comment.