Diagnose report: fix disk total query #577
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Kaige Ye [email protected]
This PR is intended to close this issue: tidb-challenge-program/bug-hunting-issue#101
Explanation:
What I changed in this PR is to delete this condition:
after beautify:
group by
is useless, since each row the result will just be saved into a mapDEVICE_NAME
LIKE '/dev%' is useless, because the system info retrived from RPC doesn't not include this prefixDEVICE_NAME
LIKE 'sda%' orDEVICE_NAME
LIKE 'nvme%' is not enough, becausesdb%
/sdc%
/vda%
are also valid, more than that, we should not have any assumption on the nameDEVICE_NAME
NOT LIKE '/dev/loop%' part, if it should be hidden in dashboard, the right place to do that is to filter it in the datasouce(i.e. these info should be filtered in TiDB/PD/TiKV/TiFlash server info collector)Another thing is, from a designer's perspective, dashboard SHOULD NOT filter any thing the underline services' report. If anything should be filtered, they should be filtered in the underline services, or these infomation will become junk info, no one use it. The only situation I can imagine to do the filter in dashboard is to do some temporary hack.