Closed tiancaiamao closed 1 week ago
Hi @tiancaiamao. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test
in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all
.
I understand the commands that are listed here.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 55.8355%. Comparing base (
40c81c0
) to head (27ec2c8
). Report is 39 commits behind head on master.
[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
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 usingschemaTS
, 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 thestartTS
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.