-
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_v2: get table cache with old schema version #51385
base: master
Are you sure you want to change the base?
Conversation
Hi @GMHDBJD. 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #51385 +/- ##
================================================
+ Coverage 70.6643% 72.7607% +2.0964%
================================================
Files 1461 1461
Lines 434873 436202 +1329
================================================
+ Hits 307300 317384 +10084
+ Misses 108320 98857 -9463
- Partials 19253 19961 +708
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@GMHDBJD: 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. |
// Maybe the table is evicted? need to reload. | ||
ret, err := loadTableInfo(is.r, is.Data, id, itm.dbID, is.ts, is.schemaVersion) | ||
if err == nil { | ||
// TODO: update schema version in BTree and Cache? |
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.
For the btree, we don't need to update it.
applyDiff
could maintain one copy of the correct schema version if table does not change.
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.
I mean if we get a table at v1, after a long time, if the version increase to v100, can we update it in Btree to v100?(if the table does not change)
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, it does not affect the correctness, but it is not always be a positive change.
Depending on our caching strategy:
- shall we always tend to cache the newest table for every schema change?
- shall we tend to lazy update the cache, i.e. cache the old table if schema change but a specific table was not touched?
- shall we tend to cache multiple schema version of a table, even the table meta info do not change?
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tiancaiamao The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@GMHDBJD: 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. |
PR needs rebase. 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. |
@GMHDBJD: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #50959
Problem Summary:
What changed and how does it work?
Check List
Tests
Start tidb, create some tabe, insert data, drop table, verify the basic operations etc...
This commit doesn't break anyting because the new code is not used now.
We need prepare a test plan document and add tests later.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.