Skip to content

copr: batch load regions when region miss #62041

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

Open
wants to merge 6 commits into
base: release-8.1
Choose a base branch
from

Conversation

you06
Copy link
Contributor

@you06 you06 commented Jun 27, 2025

What problem does this PR solve?

Issue Number: ref #53850

Problem Summary:

What changed and how does it work?

Batch load regions into the region cache when building cop tasks encounters a region miss.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
  1. Prepare data sysbench --config-file=config oltp_point_select --tables=1 --table-size=1000000 --auto_inc=false prepare
  2. Split table into 1000 regions by SPLIT TABLE sbtest1 BETWEEN (0) AND (1000000) REGIONS 1000;
  3. Restart TiDB to clean the region cache.
  4. Run a simple query explain analyze select * from sbtest1 limit 1;
  • v8.1.2: 0.23ms
  • this pr: 0.02ms

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

Please refer to Release Notes Language Style Guide to write a quality release note.

accelerate building coprocessor tasks by batch loading.

Signed-off-by: you06 <you1474600@gmail.com>

batch load regions when region miss

Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved labels Jun 27, 2025
Copy link

ti-chi-bot bot commented Jun 27, 2025

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be approved by the approvers firstly.
  2. AFTER it has been approved by approvers, please wait for the cherry-pick merging approval from triage owners.

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-sigs/prow repository.

Copy link

ti-chi-bot bot commented Jun 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cbcwestwolf for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 27, 2025
Copy link

tiprow bot commented Jun 27, 2025

Hi @you06. 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.

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-sigs/prow repository.

you06 added 2 commits June 27, 2025 14:57
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 27, 2025
you06 added 2 commits June 27, 2025 15:12
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.1@61d7f3c). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.1     #62041   +/-   ##
================================================
  Coverage               ?   71.2214%           
================================================
  Files                  ?       1468           
  Lines                  ?     424219           
  Branches               ?          0           
================================================
  Hits                   ?     302135           
  Misses                 ?     101526           
  Partials               ?      20558           
Flag Coverage Δ
unit 71.2214% <75.0000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9656% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 41.4281% <0.0000%> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@you06 you06 changed the title batch load regions when region miss copr: batch load regions when region miss Jun 27, 2025
Signed-off-by: you06 <you1474600@gmail.com>
@you06
Copy link
Contributor Author

you06 commented Jul 1, 2025

/retest

Copy link

tiprow bot commented Jul 1, 2025

@you06: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant