-
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
*: support building infoschema V2, and introduce @@tidb_schema_cache_size #51257
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/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51257 +/- ##
================================================
+ Coverage 70.6356% 72.7904% +2.1547%
================================================
Files 1462 1462
Lines 435011 435137 +126
================================================
+ Hits 307273 316738 +9465
+ Misses 108424 98464 -9960
- Partials 19314 19935 +621
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest-required |
@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/test-infra repository. |
pkg/sessionctx/variable/tidb_vars.go
Outdated
@@ -946,6 +946,9 @@ const ( | |||
|
|||
// TiDBTxnEntrySizeLimit indicates the max size of a entry in membuf. | |||
TiDBTxnEntrySizeLimit = "tidb_txn_entry_size_limit" | |||
|
|||
// TiDBInfoSchemaCacheSize indicates the size of infoschema meta data which are cached in V2 implementation. | |||
TiDBInfoSchemaCacheSize = "tidb_infoschema_cache_size" |
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.
When modify the variable, should we force trigger reload infoschema?
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.
Yes, we can, but it seems we need to register callback function in SetGlobal
to call the function in domain.
How to do that is a bit complex, considering infoschema reload is called eventually anyway, I skip the force trigger part.
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: easonn7, GMHDBJD, ywqzzy 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 #51256
ref #50959
!!! Need to merge #51058 first before reviewing this PR.(DONE)Problem Summary:
What changed and how does it work?
Before this change, when infoschema Builder builds the infoschema v2, it depends on building the infoschema v1 object
and rely on an
infoschemaProxy
object to pretender to be an InfoSchema instance.Now it support build and use infoschemaV2 object directly.
@@tidb_schema_cache_size
global session variableThe variable work as a switch for us to enable v2 if it's value is not equal to 0.
We can now change to infoschema v2 and change back to v1, it make the testing easier.
Check List
Tests
Side effects
Documentation
Caution: if we expose this global variable, but infoschema v2 implementation has not finish yet, modify the default value would be buggy. There are two options:
I would prefer 1 because it's still at an early stage for infoschema v2.
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.