Skip to content

Add TTL mechanism for region cache(release-8.5)#10749

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5from
gengliqi:add-region-ttl-8.5
Mar 18, 2026
Merged

Add TTL mechanism for region cache(release-8.5)#10749
ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5from
gengliqi:add-region-ttl-8.5

Conversation

@gengliqi

@gengliqi gengliqi commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #10748

Problem Summary:

What is changed and how it works?

Add TTL mechanism for region cache

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Summary by CodeRabbit

  • Chores
    • Updated dependencies.

u
Signed-off-by: gengliqi <gengliqiii@gmail.com>
@ti-chi-bot ti-chi-bot Bot added do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 17, 2026
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request updates a submodule reference in contrib/client-c from one commit hash to another, updating the pointer without introducing code or behavior changes to the main project.

Changes

Cohort / File(s) Summary
Submodule Update
contrib/client-c
Updated submodule commit reference from d55cbe... to 7fb352...

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, a pointer's trace,
From one commit to another place,
The submodule finds its new home sweet,
Where client-c makes the bundle complete!
No code was changed, just paths aligned—
A gentle nudge of the submodule kind! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add TTL mechanism for region cache(release-8.5)' is fully related to the main change - the submodule update implements a TTL mechanism for region cache.
Description check ✅ Passed The PR description follows the required template structure with all sections present: problem statement with issue reference, commit message describing the change, and completed checklist marking unit test as included.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contrib/client-c`:
- Line 1: The submodule reference for client-c points to an invalid commit hash
(7fb35237c90602ae00a3b4897f3876cdcb9afb05); update the client-c submodule to a
valid, pushed commit (or remove the submodule change) by checking out/pushing
the intended commit in the client-c repo and running git submodule sync && git
submodule update --init --recursive, then commit the updated submodule pointer;
also update the PR description to explain how the client-c submodule change
relates to the "adding a TTL mechanism for region cache" objective so reviewers
can see why the submodule change is required.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7894133c-c13d-4538-bdfb-491d750282e2

📥 Commits

Reviewing files that changed from the base of the PR and between b75f7a5 and 73d953e.

📒 Files selected for processing (1)
  • contrib/client-c

Comment thread contrib/client-c
@@ -1 +1 @@
Subproject commit d55cbe2461fa82c84f473445050249504f1002a6
Subproject commit 7fb35237c90602ae00a3b4897f3876cdcb9afb05

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Examine the submodule changes to understand what's being updated

# Navigate to the submodule and show the changes
cd contrib/client-c || exit 1

# Get the previous commit (not available in current context, but show recent history)
echo "=== Recent commits in client-c submodule ==="
git log --oneline -10

echo -e "\n=== Current commit details ==="
git show --stat 7fb35237c90602ae00a3b4897f3876cdcb9afb05

echo -e "\n=== Files changed in current commit ==="
git diff-tree --no-commit-id --name-only -r 7fb35237c90602ae00a3b4897f3876cdcb9afb05

Repository: pingcap/tiflash

Length of output: 550


🏁 Script executed:

#!/bin/bash
# Description: Search for region cache TTL related test files

# Search for test files mentioning region, cache, or TTL
fd -e cpp -e cc -e h test | xargs rg -l "region.*cache.*ttl|ttl.*region.*cache" -i || echo "No matching test files found"

# Search for recently modified test files
echo -e "\n=== Recently modified test files ==="
git diff --name-only HEAD~5 HEAD | grep -i test || echo "No test files in recent commits"

Repository: pingcap/tiflash

Length of output: 443


Submodule commit reference appears to be invalid.

The commit hash 7fb35237c90602ae00a3b4897f3876cdcb9afb05 referenced in the submodule update is not accessible in the client-c repository. This suggests either an incorrect reference, uncommitted/unpushed changes, or an incomplete PR state that needs resolution.

Additionally, the relationship between the client-c submodule and the stated PR objective of "adding a TTL mechanism for region cache" should be clarified in the PR description.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@contrib/client-c` at line 1, The submodule reference for client-c points to
an invalid commit hash (7fb35237c90602ae00a3b4897f3876cdcb9afb05); update the
client-c submodule to a valid, pushed commit (or remove the submodule change) by
checking out/pushing the intended commit in the client-c repo and running git
submodule sync && git submodule update --init --recursive, then commit the
updated submodule pointer; also update the PR description to explain how the
client-c submodule change relates to the "adding a TTL mechanism for region
cache" objective so reviewers can see why the submodule change is required.

@xzhangxian1008 xzhangxian1008 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 17, 2026

@windtalker windtalker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-chi-bot ti-chi-bot Bot added the lgtm label Mar 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: windtalker, xzhangxian1008

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 17, 2026
@ti-chi-bot

ti-chi-bot Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

[LGTM Timeline notifier]

Timeline:

  • 2026-03-17 06:12:31.92057134 +0000 UTC m=+251079.008228897: ☑️ agreed by xzhangxian1008.
  • 2026-03-17 11:46:48.201860489 +0000 UTC m=+271135.289518027: ☑️ agreed by windtalker.

@ti-chi-bot ti-chi-bot Bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Mar 18, 2026
@ti-chi-bot ti-chi-bot Bot merged commit 7e58969 into pingcap:release-8.5 Mar 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants