-
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
executor: optimize the get snapshot table meta for tiflash/replica HTTP API #17969
Conversation
…TP API Signed-off-by: crazycs520 <crazycs520@gmail.com>
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
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
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #17969 +/- ##
===========================================
Coverage 79.4551% 79.4551%
===========================================
Files 524 524
Lines 142065 142065
===========================================
Hits 112878 112878
Misses 20059 20059
Partials 9128 9128 |
/run-all-tests |
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
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.1 in PR #18183 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #18184 |
Signed-off-by: crazycs520 crazycs520@gmail.com
What problem does this PR solve?
backaground
/tiflash/replica
HTTP API needs to read the dropped or truncated table information with snapshot.Before this PR, TiDB will use
GetSnapshotInfoSchema
to generate a snapshot information schema, then read the dropped or truncated table from this snapshot information.The problem is, if there are too many dropped/truncated DDL history jobs, and the GC life is too long, then query
/tiflash/replica
HTTP API will be very slow, the most of time is spent on the generate many snapshot information schema.This PR just use the schema ID and table ID to load the table information with snapshot, avoid the expensive generated snapshot information schema process.
Related changes
Check List
Tests
Side effects
Release note
optimize the get snapshot table meta for tiflash/replica HTTP API.