-
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: keep the timestamp of infoschema v2 updating #52983
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #52983 +/- ##
=================================================
- Coverage 72.3860% 55.8355% -16.5505%
=================================================
Files 1482 1620 +138
Lines 428754 615656 +186902
=================================================
+ Hits 310358 343755 +33397
- Misses 99088 248679 +149591
- Partials 19308 23222 +3914
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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, 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 #52683
ref #50959
Problem Summary:
It's casued by compatibility issue between infoschema v2 and GC worker.
For infoschema v2, it contains a
ts
field,SchemaTables
andloadTableInfo
need thists
to get the corresponding schema meta snapshot.We store the schemaTS as the
ts
of an infoschema v2 object in the past.Whether it's
schemaTS
orstartTS
does not matter, because they both use the same schema version and data.But when we're using
schemaTS
, it's not up to date.For example, a DDL happened 30 minutes ago. (so the
ts
of infoschema v2 object is 30 min ago)GC happened 10 minutes ago.
Now we get the infoschema v2 object, and use it, we would get the "GC life time is shorter than transaction duration" error.
What changed and how does it work?
Instead of using
schemaTS
for infoschema v2 object, we can change to usestartTS
,and keep the
startTS
updating in domain load schema loop periodically.So that we can get rid of the "GC life time is shorter than transaction duration" error.
Check List
Tests
Start a cluster and wait for GC, and see no panic.
Not easy to do that in unit test because GC is mocked and not really the same as real tikv.
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.