Skip to content
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

Merged
merged 6 commits into from
Aug 21, 2020

Conversation

overvenus
Copy link
Member

What problem does this PR solve?

Add service gc safepoint commands. Resolve #2786

Tests

  • Unit test

Code changes

Related changes

Release note

  • Add service gc safepoit commands

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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2017 TiKV Project Authors.
// Copyright 2020 TiKV Project Authors.

@@ -0,0 +1,70 @@
// Copyright 2017 TiKV Project Authors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright 2017 TiKV Project Authors.
// Copyright 2020 TiKV Project Authors.

Signed-off-by: Neil Shen <overvenus@gmail.com>
@overvenus overvenus added the needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. label Aug 19, 2020
Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2020
@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about /gc/safepoint?

if err != nil {
return nil, err
}
ssps := make([]*ServiceSafePoint, 0, len(keys))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better move to L498

@rleungx rleungx changed the title *: add service gc safepoit commands *: add service gc safepoint commands Aug 20, 2020
Signed-off-by: Neil Shen <overvenus@gmail.com>
@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Aug 21, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 21, 2020
@disksing
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 21, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit d40341c into tikv:master Aug 21, 2020
ti-srebot pushed a commit to ti-srebot/pd that referenced this pull request Aug 21, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #2813

@overvenus overvenus deleted the service-gc-safepoint branch August 21, 2020 06:28
ti-srebot added a commit that referenced this pull request Aug 21, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
Signed-off-by: Neil Shen <overvenus@gmail.com>
ZenoTan pushed a commit to ZenoTan/pd that referenced this pull request Aug 24, 2020
Signed-off-by: Neil Shen <overvenus@gmail.com>
Signed-off-by: ZenoTan <zenotan1998@gmail.com>
jyz0309 pushed a commit to jyz0309/pd that referenced this pull request Aug 24, 2020
Signed-off-by: Neil Shen <overvenus@gmail.com>
jyz0309 pushed a commit to jyz0309/pd that referenced this pull request Aug 24, 2020
Signed-off-by: Neil Shen <overvenus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api HTTP API. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a pd-ctl command to manipulate ServiceGCSafePoint
5 participants