Skip to content

Commit 882eb1d

Browse files
authored
resource_manager: basic implement about manage resource group (#5785)
ref #5784 resource_manager: basic implement about manage resource group Signed-off-by: nolouch <nolouch@gmail.com>
1 parent 420bd35 commit 882eb1d

File tree

21 files changed

+1309
-87
lines changed

21 files changed

+1309
-87
lines changed

cmd/pd-server/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ import (
3939

4040
// Register schedulers.
4141
_ "github.com/tikv/pd/server/schedulers"
42+
43+
// Register Service
44+
_ "github.com/tikv/pd/pkg/mcs/registry"
45+
_ "github.com/tikv/pd/pkg/mcs/resource_manager/server/install"
4246
)
4347

4448
func main() {

go.mod

+24-16
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ require (
1212
github.com/coreos/go-semver v0.3.0
1313
github.com/docker/go-units v0.4.0
1414
github.com/elliotchance/pie/v2 v2.1.0
15-
github.com/gin-gonic/gin v1.7.4
15+
github.com/gin-contrib/cors v1.4.0
16+
github.com/gin-gonic/gin v1.8.1
1617
github.com/go-echarts/go-echarts v1.0.0
1718
github.com/gogo/protobuf v1.3.2
1819
github.com/google/btree v1.1.2
@@ -25,7 +26,7 @@ require (
2526
github.com/pingcap/errcode v0.3.0
2627
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c
2728
github.com/pingcap/failpoint v0.0.0-20200702092429-9f69995143ce
28-
github.com/pingcap/kvproto v0.0.0-20221104101942-09d82b914df1
29+
github.com/pingcap/kvproto v0.0.0-20221221093947-0a9b14f1fc26
2930
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3
3031
github.com/pingcap/sysutil v0.0.0-20211208032423-041a72e5860d
3132
github.com/pingcap/tidb-dashboard v0.0.0-20221201151320-ea3ee6971f2e
@@ -34,7 +35,7 @@ require (
3435
github.com/sasha-s/go-deadlock v0.2.0
3536
github.com/spf13/cobra v1.0.0
3637
github.com/spf13/pflag v1.0.5
37-
github.com/stretchr/testify v1.7.1
38+
github.com/stretchr/testify v1.8.0
3839
github.com/swaggo/http-swagger v0.0.0-20200308142732-58ac5e232fba
3940
github.com/swaggo/swag v1.8.3
4041
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
@@ -50,6 +51,13 @@ require (
5051
gotest.tools/gotestsum v1.7.0
5152
)
5253

54+
require (
55+
github.com/goccy/go-json v0.9.7 // indirect
56+
github.com/google/go-cmp v0.5.8 // indirect
57+
github.com/onsi/gomega v1.20.1 // indirect
58+
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
59+
)
60+
5361
require (
5462
github.com/KyleBanks/depth v1.2.1 // indirect
5563
github.com/Masterminds/semver v1.5.0 // indirect
@@ -74,26 +82,26 @@ require (
7482
github.com/fogleman/gg v1.3.0 // indirect
7583
github.com/fsnotify/fsnotify v1.4.9 // indirect
7684
github.com/ghodss/yaml v1.0.0 // indirect
77-
github.com/gin-contrib/gzip v0.0.1 // indirect
85+
github.com/gin-contrib/gzip v0.0.1
7886
github.com/gin-contrib/sse v0.1.0 // indirect
7987
github.com/go-ole/go-ole v1.2.4 // indirect
8088
github.com/go-openapi/jsonpointer v0.19.5 // indirect
8189
github.com/go-openapi/jsonreference v0.19.6 // indirect
8290
github.com/go-openapi/spec v0.20.4 // indirect
8391
github.com/go-openapi/swag v0.19.15 // indirect
84-
github.com/go-playground/locales v0.13.0 // indirect
85-
github.com/go-playground/universal-translator v0.17.0 // indirect
86-
github.com/go-playground/validator/v10 v10.4.1 // indirect
92+
github.com/go-playground/locales v0.14.0 // indirect
93+
github.com/go-playground/universal-translator v0.18.0 // indirect
94+
github.com/go-playground/validator/v10 v10.10.0 // indirect
8795
github.com/go-resty/resty/v2 v2.6.0 // indirect
8896
github.com/go-sql-driver/mysql v1.6.0 // indirect
8997
github.com/goccy/go-graphviz v0.0.9 // indirect
9098
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
9199
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
92-
github.com/golang/protobuf v1.5.0 // indirect
100+
github.com/golang/protobuf v1.5.2 // indirect
93101
github.com/golang/snappy v0.0.4 // indirect
94102
github.com/google/pprof v0.0.0-20211122183932-1daafda22083 // indirect
95103
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
96-
github.com/google/uuid v1.0.0 // indirect
104+
github.com/google/uuid v1.1.2 // indirect
97105
github.com/gorilla/websocket v1.4.2 // indirect
98106
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 // indirect
99107
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
@@ -108,10 +116,10 @@ require (
108116
github.com/josharian/intern v1.0.0 // indirect
109117
github.com/json-iterator/go v1.1.12 // indirect
110118
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
111-
github.com/leodido/go-urn v1.2.0 // indirect
119+
github.com/leodido/go-urn v1.2.1 // indirect
112120
github.com/mailru/easyjson v0.7.6 // indirect
113121
github.com/mattn/go-colorable v0.1.8 // indirect
114-
github.com/mattn/go-isatty v0.0.12 // indirect
122+
github.com/mattn/go-isatty v0.0.14 // indirect
115123
github.com/mattn/go-runewidth v0.0.8 // indirect
116124
github.com/mattn/go-sqlite3 v1.14.9 // indirect
117125
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
@@ -136,7 +144,7 @@ require (
136144
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
137145
github.com/sirupsen/logrus v1.4.2 // indirect
138146
github.com/soheilhy/cmux v0.1.4 // indirect
139-
github.com/stretchr/objx v0.2.0 // indirect
147+
github.com/stretchr/objx v0.4.0 // indirect
140148
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 // indirect
141149
github.com/thoas/go-funk v0.8.0 // indirect
142150
github.com/tidwall/gjson v1.9.3 // indirect
@@ -158,23 +166,23 @@ require (
158166
golang.org/x/exp v0.0.0-20220321173239-a90fa8a75705
159167
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
160168
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
161-
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
169+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
162170
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be // indirect
163171
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
164-
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
172+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
165173
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
166174
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
167175
google.golang.org/appengine v1.4.0 // indirect
168176
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c // indirect
169177
google.golang.org/protobuf v1.28.0 // indirect
170178
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
171179
gopkg.in/yaml.v2 v2.4.0 // indirect
172-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
180+
gopkg.in/yaml.v3 v3.0.1 // indirect
173181
gorm.io/driver/mysql v1.0.6 // indirect
174182
gorm.io/driver/sqlite v1.1.4 // indirect
175183
gorm.io/gorm v1.21.9 // indirect
176184
moul.io/zapgorm2 v1.1.0 // indirect
177-
sigs.k8s.io/yaml v1.1.0 // indirect
185+
sigs.k8s.io/yaml v1.2.0 // indirect
178186
)
179187

180188
// When you modify PD cooperatively with kvproto, this will be useful to submit the PR to PD and the PR to

0 commit comments

Comments
 (0)