-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: add service gc safepoint commands #2797
Conversation
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
@@ -0,0 +1,70 @@ | |||
// Copyright 2017 TiKV Project Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2017 TiKV Project Authors. | |
// Copyright 2020 TiKV Project Authors. |
@@ -0,0 +1,70 @@ | |||
// Copyright 2017 TiKV Project Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2017 TiKV Project Authors. | |
// Copyright 2020 TiKV Project Authors. |
Signed-off-by: Neil Shen <overvenus@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
server/api/router.go
Outdated
@@ -208,6 +208,11 @@ func createRouter(ctx context.Context, prefix string, svr *server.Server) *mux.R | |||
apiRouter.Handle("/debug/pprof/block", pprof.Handler("block")) | |||
apiRouter.Handle("/debug/pprof/goroutine", pprof.Handler("goroutine")) | |||
|
|||
// service GC safepoint API | |||
serviceGCSafepointHandler := newServiceGCSafepointHandler(svr, rd) | |||
apiRouter.HandleFunc("/servicegcsafepoint", serviceGCSafepointHandler.List).Methods("GET") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about /gc/safepoint
?
server/core/storage.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
ssps := make([]*ServiceSafePoint, 0, len(keys)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better move to L498
Signed-off-by: Neil Shen <overvenus@gmail.com>
/merge |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #2813 |
Signed-off-by: Neil Shen <overvenus@gmail.com> Signed-off-by: ZenoTan <zenotan1998@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
What problem does this PR solve?
Add service gc safepoint commands. Resolve #2786
Tests
Code changes
Related changes
pingcap/docs
/pingcap/docs-cn
:Release note