ttl: add info schema cache and ttl table status table cache for ttl scheduler (#39467)#39628
Conversation
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
@YangKeao PTAL |
It would be fixed automatically after #39619 is merged 🤔 |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 46a2d47 |
This is an automated cherry-pick of #39467
What problem does this PR solve?
Issue Number: close #39466
Problem Summary:
To implement a ttl job scheduler, we'll need a local map for info schema and ttl table status, to map from a physical table id to related schema information and the information stored in the ttl table status
What is changed and how it works?
It does the following changes:
ttl/session, and add an interface of session pool into it (though there are some existing session pool, with the same definition here). I don't know whether it appropriate to add yet another session pool interface (but others are in extensions, br... pkg).InfoSchemaCacheand theTTLTableStatusCache. They are the local mirror of the info schema andmysql.tidb_ttl_table_statussystem table.This PR relies on #39315. Please merge it before this one.
Check List
Tests