-
Notifications
You must be signed in to change notification settings - Fork 6k
executor/infoschema_reader: exclude virtual schema in TIKV_REGION_STATUS #61068
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
executor/infoschema_reader: exclude virtual schema in TIKV_REGION_STATUS #61068
Conversation
Welcome @sriramrajendiran! |
Hi @sriramrajendiran. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
Hi @sriramrajendiran. 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. |
/ok-to-test |
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.
Pull Request Overview
This PR updates the TiKV region status query to exclude virtual schemas from the results. Key changes include:
- Adding a check to skip regions from INFORMATION_SCHEMA, METRICS_SCHEMA, and PERFORMANCE_SCHEMA.
- Updating unit tests to verify that virtual schemas are properly excluded.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/executor/infoschema_reader.go | Added conditional exclusion of virtual schemas in the TiKV region status query. |
pkg/executor/infoschema_cluster_table_test.go | Added a unit test to verify that virtual schemas are excluded from the query results. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61068 +/- ##
================================================
+ Coverage 73.1498% 73.5003% +0.3505%
================================================
Files 1724 1724
Lines 477078 480192 +3114
================================================
+ Hits 348982 352943 +3961
+ Misses 106697 105805 -892
- Partials 21399 21444 +45
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/cc @tangenta |
pkg/executor/infoschema_reader.go
Outdated
for i := range allRegionsInfo.Regions { | ||
regionTableList := tableInfos[allRegionsInfo.Regions[i].ID] | ||
if len(regionTableList) == 0 { | ||
e.setNewTiKVRegionStatusCol(&allRegionsInfo.Regions[i], nil) | ||
} | ||
for j, regionTable := range regionTableList { | ||
// Exclude virtual schemas | ||
if slices.Contains(virtualSchemas, regionTable.DB.Name.L) { |
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.
you can use util.IsMemDB
function.
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance6716, tangenta 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 |
What problem does this PR solve?
Issue Number: close #59698
Problem Summary:
What changed and how does it work?
Add a check to exclude INFORMATION_SCHEMA, METRICS_SCHEMA and PERFORMANCE_SCHEMA when TIKV_REGION_STATUS is queried.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.