-
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
planner,executor,infoschema: add system table table_storage_stats
#15056
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15056 +/- ##
===========================================
Coverage 79.6451% 79.6451%
===========================================
Files 520 520
Lines 141308 141308
===========================================
Hits 112545 112545
Misses 19773 19773
Partials 8990 8990 |
…nto add_disk_usage_tb
disk_usage
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.
No test cases?
Maybe we should integrate it with |
disk_usage
table_storage_stats
/run-all-tests |
/run-unit-test |
|
||
// Extract the tables to the initialTable. | ||
for _, db := range databases { | ||
// The user didn't specified the table, extract all tables of this db to initialTable. |
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.
s/db/DB
executor/infoschema_reader.go
Outdated
} | ||
} | ||
|
||
// Cache the helper and return an error if pd unavailable. |
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.
s/pd/PD
executor/infoschema_reader.go
Outdated
rows := make([][]types.Datum, 0, 1024) | ||
count := 0 | ||
for e.curTable < len(e.initialTables) && count < 1024 { | ||
table := (e.initialTables)[e.curTable] |
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.
table := (e.initialTables)[e.curTable] | |
table := e.initialTables[e.curTable] |
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
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,
Please address comment.
…nto add_disk_usage_tb
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-cherry-picker |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #20431 |
What problem does this PR solve?
we can only get the disk-usage from http API
What is changed and how it works?
PdRegionStats
func to helper which used by http API and this sys table.Check List
Tests
Release note
table_storage_stats