Skip to content

Conversation

@Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Nov 18, 2025

What problem does this PR solve?

Issue Number: close #64514

Problem Summary:
the store id of region leader scanned may be 0.

What changed and how does it work?

add region scan checker to check the leader store id after each region scan API.

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.

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.

None

Signed-off-by: Jianjun Liao <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 18, 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 3pointer 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Nov 18, 2025
@tiprow
Copy link

tiprow bot commented Nov 18, 2025

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

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

❌ Patch coverage is 89.74359% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.8699%. Comparing base (5bead56) to head (a05629b).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64530        +/-   ##
================================================
+ Coverage   72.6805%   74.8699%   +2.1894%     
================================================
  Files          1866       1889        +23     
  Lines        506361     516414     +10053     
================================================
+ Hits         368026     386639     +18613     
+ Misses       115940     105951      -9989     
- Partials      22395      23824      +1429     
Flag Coverage Δ
integration 48.1466% <58.9743%> (?)
unit 72.5527% <89.7435%> (+0.2998%) ⬆️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 62.3479% <89.7435%> (+16.1717%) ⬆️
🚀 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.

@lance6716
Copy link
Contributor

please help push PD side to accept this request tikv/pd#8442

@lance6716 lance6716 requested a review from okJiang November 18, 2025 09:34
Signed-off-by: Jianjun Liao <[email protected]>
@okJiang
Copy link
Member

okJiang commented Nov 21, 2025

please help push PD side to accept this request tikv/pd#8442

Got it. I will try

}

func checkRegionConsistency(startKey, endKey []byte, regions []*RegionInfo) error {
func checkRegionConsistency(startKey, endKey []byte, regions []*RegionInfo, limitted bool) error {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment for limited?

lastRegions = regions

if err = checkRegionConsistency(startKey, endKey, regions); err != nil {
if err = checkRegionConsistency(startKey, endKey, regions, false); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

How about moving this to here and not call checkRegionConsistency?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BR restore failed with error "type:UNKNOWN message:\"invalid store ID 0, not found\" when simulated pd network partition or pd rolling restart

3 participants