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
infoschema: refactor GetClusterServerInfo to avoid executing internal SQL #13765
Conversation
Signed-off-by: Lonng <heng@lonng.org>
Codecov Report
@@ Coverage Diff @@
## master #13765 +/- ##
===========================================
Coverage 80.0626% 80.0626%
===========================================
Files 474 474
Lines 117107 117107
===========================================
Hits 93759 93759
Misses 15964 15964
Partials 7384 7384 |
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
/run-all-tests |
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
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
Change the PR title: inforschema => infoschema, execute => executing. |
@djshow832 Please approve this PR. |
/merge |
/run-all-tests |
Signed-off-by: Lonng heng@lonng.org
What problem does this PR solve?
In the current implementation, we must to execute
SELECT type, address, status_address FROM INFORMATION_SCHEMA.TIDB_CLUSTER_INFO ORDER BY type
to obtain cluster topology. That's inefficient.What is changed and how it works?
This PR refactor this part and extras an individual function to obtains cluster topology and make other functions work more easily.
Check List
Tests
Code changes
Release note