Skip to content

Commit

Permalink
*: cpu resource manager
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Dec 13, 2022
1 parent c078107 commit 1faed29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tidb-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go_library(
"//planner/core",
"//plugin",
"//privilege/privileges",
"//resourcemanager:resourcemanage",
"//server",
"//session",
"//session/txninfo",
Expand Down
3 changes: 3 additions & 0 deletions tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (
plannercore "github.com/pingcap/tidb/planner/core"
"github.com/pingcap/tidb/plugin"
"github.com/pingcap/tidb/privilege/privileges"
"github.com/pingcap/tidb/resourcemanager"
"github.com/pingcap/tidb/server"
"github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/session/txninfo"
Expand Down Expand Up @@ -210,6 +211,7 @@ func main() {
printInfo()
setupBinlogClient()
setupMetrics()
resourcemanager.GlobalResourceManager.Start()

Check warning on line 214 in tidb-server/main.go

View check run for this annotation

Codecov / codecov/patch

tidb-server/main.go#L214

Added line #L214 was not covered by tests
storage, dom := createStoreAndDomain()
svr := createServer(storage, dom)

Expand All @@ -223,6 +225,7 @@ func main() {
svr.Close()
cleanup(svr, storage, dom, graceful)
cpuprofile.StopCPUProfiler()
resourcemanager.GlobalResourceManager.Stop()

Check warning on line 228 in tidb-server/main.go

View check run for this annotation

Codecov / codecov/patch

tidb-server/main.go#L228

Added line #L228 was not covered by tests
close(exited)
})
topsql.SetupTopSQL()
Expand Down

0 comments on commit 1faed29

Please sign in to comment.