-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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,executor: change TableByID to skip refill infoschema v2 cache #55101
Conversation
Hi @tiancaiamao. 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55101 +/- ##
================================================
+ Coverage 74.8025% 75.5334% +0.7309%
================================================
Files 1570 1576 +6
Lines 364715 446859 +82144
================================================
+ Hits 272816 337528 +64712
- Misses 72132 88473 +16341
- Partials 19767 20858 +1091
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
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.
Should we let caller decide noRefill
cache? I think there are some cases that full tables load is trigger but we still need to skip refill, like keyvis queries all tables.
Change interface method involves much more code changes. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, lance6716 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: ref #50959
Problem Summary:
During "select * from INFORMATION_SCHEMA.TABLES where table_schema = 'test'", the schema cache hit ratio drop to nearly 0
What changed and how does it work?
It's cause by that the result need to show the next autoid info, so it calls TableByName.
And since this is a list API, the infoschema v2 cache is affect by the cache refill.
In this commit I change it to use TableByID, and change TableByID to skip refill infoschema v2 cache.
The observation is that: when we call TableByID, we must know the table ID ... how do we get the ID? something like TableByName may have been called, so we do not need to update cache again in TableByID because TableByName already do it.
Check List
Tests
Verify the scanerio and check cache hit ratio.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.