Skip to content

Commit aae12d9

Browse files
authored
pkg: remove auto scaling (#9205)
close #9206 Signed-off-by: Ryan Leung <[email protected]>
1 parent de4bc50 commit aae12d9

File tree

17 files changed

+4
-1903
lines changed

17 files changed

+4
-1903
lines changed

cmd/pd-server/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727

2828
"github.com/pingcap/log"
2929

30-
"github.com/tikv/pd/pkg/autoscaling"
3130
"github.com/tikv/pd/pkg/dashboard"
3231
"github.com/tikv/pd/pkg/errs"
3332
scheduling "github.com/tikv/pd/pkg/mcs/scheduling/server"
@@ -235,7 +234,7 @@ func start(cmd *cobra.Command, args []string, services ...string) {
235234

236235
// Creates server.
237236
ctx, cancel := context.WithCancel(context.Background())
238-
serviceBuilders := []server.HandlerBuilder{api.NewHandler, apiv2.NewV2Handler, autoscaling.NewHandler}
237+
serviceBuilders := []server.HandlerBuilder{api.NewHandler, apiv2.NewV2Handler}
239238
if swaggerserver.Enabled() {
240239
serviceBuilders = append(serviceBuilders, swaggerserver.NewHandler)
241240
}

errors.toml

-30
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,6 @@ error = '''
3131
redirect to not primary
3232
'''
3333

34-
["PD:autoscaling:ErrEmptyMetricsResponse"]
35-
error = '''
36-
metrics response from Prometheus is empty
37-
'''
38-
39-
["PD:autoscaling:ErrEmptyMetricsResult"]
40-
error = '''
41-
result from Prometheus is empty, %s
42-
'''
43-
44-
["PD:autoscaling:ErrTypeConversion"]
45-
error = '''
46-
type conversion error
47-
'''
48-
49-
["PD:autoscaling:ErrUnexpectedType"]
50-
error = '''
51-
unexpected type %v
52-
'''
53-
54-
["PD:autoscaling:ErrUnsupportedComponentType"]
55-
error = '''
56-
unsupported component type %v
57-
'''
58-
59-
["PD:autoscaling:ErrUnsupportedMetricsType"]
60-
error = '''
61-
unsupported metrics type %v
62-
'''
63-
6434
["PD:cgroup:ErrNoCPUControllerDetected"]
6535
error = '''
6636
no cpu controller detected

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ require (
4040
github.com/pingcap/sysutil v1.0.1-0.20230407040306-fb007c5aff21
4141
github.com/pingcap/tidb-dashboard v0.0.0-20250219061340-d62018124ae2
4242
github.com/prometheus/client_golang v1.20.5
43-
github.com/prometheus/common v0.55.0
4443
github.com/sasha-s/go-deadlock v0.3.5
4544
github.com/shirou/gopsutil/v3 v3.23.3
4645
github.com/smallnest/chanx v1.2.1-0.20240521153536-01121e21ff99
@@ -65,6 +64,8 @@ require (
6564
gotest.tools/gotestsum v1.7.0
6665
)
6766

67+
require github.com/prometheus/common v0.55.0 // indirect
68+
6869
require (
6970
github.com/KyleBanks/depth v1.2.1 // indirect
7071
github.com/Masterminds/semver v1.5.0 // indirect

go.sum

-4
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ github.com/joomcode/errorx v1.0.1 h1:CalpDWz14ZHd68fIqluJasJosAewpz2TFaJALrUxjrk
298298
github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ=
299299
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
300300
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
301-
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
302-
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
303301
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
304302
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
305303
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -358,8 +356,6 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
358356
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
359357
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
360358
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
361-
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
362-
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
363359
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY=
364360
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
365361
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=

0 commit comments

Comments
 (0)