-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[WIP]handler: add /db-table?table_ids={...}
#54280
Conversation
Signed-off-by: lance6716 <lance6716@gmail.com>
Hi @lance6716. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
docs/tidb_http_api.md
Outdated
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.
wrong diff calculation 😂
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.
can you point where are changed, diff so large
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.
- My IDE writes the correct order for the markdown item list
- add the new API under "10. Get database information, table information and tidb info schema version by tableID."
Signed-off-by: lance6716 <lance6716@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54280 +/- ##
=================================================
- Coverage 72.8476% 56.5699% -16.2778%
=================================================
Files 1542 1669 +127
Lines 436136 619352 +183216
=================================================
+ Hits 317715 350367 +32652
- Misses 98837 245475 +146638
- Partials 19584 23510 +3926
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/schema?table_ids={...}
/schema?table_ids={...}
/schema?table_ids={...}
/schema?table_ids={...}
/schema?table_ids={...}
/schema?table_ids={...}
/db-table?table_ids={...}
docs/tidb_http_api.md
Outdated
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.
can you point where are changed, diff so large
@@ -248,6 +248,7 @@ func (s *Server) startHTTPServer() { | |||
router.Handle("/info", tikvhandler.NewServerInfoHandler(tikvHandlerTool)).Name("Info") | |||
router.Handle("/info/all", tikvhandler.NewAllServerInfoHandler(tikvHandlerTool)).Name("InfoALL") | |||
// HTTP path for get db and table info that is related to the tableID. | |||
router.Handle("/db-table", tikvhandler.NewDBTableHandler(tikvHandlerTool)).Name("DB Table") |
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.
prefer /tables
, but we have used /db-table
, ok to reuse the word
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.
rest lgtm
require.NoError(t, err) | ||
require.NoError(t, resp.Body.Close()) |
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.
check response code=400
data[tid] = tbl | ||
} | ||
} | ||
handler.WriteData(w, data) |
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.
maybe consider wrap data inside another common struct for further extend
{
data: <real-data>
}
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.
@mornyx Do you think it's better we add another level JSON object?
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.
/schema
does not follow this design. Maybe we should keep them consistent?
} | ||
tbl, err := getDBTableInfo(schema, int64(tid)) | ||
if err == nil { | ||
data[tid] = tbl |
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.
do dashboard need to know it's partially result?
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.
Current way to process the result is verified by dashboard dev.
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.
For the dashboard scenario alone this is as designed.
Signed-off-by: lance6716 <lance6716@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/db-table?table_ids={...}
/db-table?table_ids={...}
Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716: 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/test-infra repository. I understand the commands that are listed here. |
If it's ready for review, you can remove the [WIP] label @lance6716 |
Due to problems on keyvis side, I will open another PR to fix the issue. The API in this PR can't be used smoothly. |
replaced by #54608 (still WIP) |
What problem does this PR solve?
Issue Number: close #54281
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.