-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
server: add initial status server to provide debug functionalities before starting server #59122
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #59122 +/- ##
================================================
+ Coverage 73.0925% 73.4910% +0.3985%
================================================
Files 1684 1684
Lines 466350 467408 +1058
================================================
+ Hits 340867 343503 +2636
+ Misses 104548 102952 -1596
- Partials 20935 20953 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
ctx, cancel := context.WithTimeout(context.Background(), stopInitialStatusServerTimeout) | ||
defer cancel() | ||
|
||
err := initialStatusServer.Shutdown(ctx) |
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.
The only concern is that the requests to /debug/pprof/profile
will block the Shutdown
for a long time (so I gave it a 5s
timeout).
It's also fine to Close
directly IMO, but I'm not sure which one is better.
9757729
to
60e76e6
Compare
Signed-off-by: Yang Keao <[email protected]>
@YangKeao: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #59087
Problem Summary:
The
/debug/pprof/xxx
endpoints in status server and the signal handler ofSIGUSR1
are very helpful for the developers to debug running tidb-server. However, they are only available after starting the server. If the TiDB server is somehow blocked before starting successfully (like loadingInfoSchema
for a very long time), it'll be hard for us to investigate the issue.What changed and how does it work?
/debug/pprof/xxx
interface and/metrics
interface.Check List
Tests
Side effects
Documentation
Release note