8000 core: Refactor checkstore and progress manager by okJiang · Pull Request #9333 · tikv/pd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

core: Refactor checkstore and progress manager #9333

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 20 commits into
base: master
Choose a base branch
from

Conversation

okJiang
Copy link
Member
@okJiang okJiang commented May 20, 2025

What problem does this PR solve?

Issue Number: Close #8165

What is changed and how does it work?

  • Converge the progress calculation logic into the progress manager and progress indicator
  • Each time new data is added, the indicator will automatically calculate the progress
  • Progress related metrics will be updated in the progress manager
  • Refactoring checkStore using switch
  • Added GC logic in progress manager

Check List

Tests

  • Unit test
  • Integration test
  • Manual test

The speed change is smooth
image

After the online and offline are completed, the progress is 100
image

Release note

None.

okJiang added 8 commits May 19, 2025 15:52
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels May 20, 2025
Copy link
Contributor
ti-chi-bot bot commented May 20, 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 rleungx 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 20, 2025
@okJiang okJiang marked this pull request as draft May 20, 2025 09:53
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2025
okJiang added 2 commits May 21, 2025 17:25
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
@okJiang okJiang marked this pull request as ready for review May 21, 2025 10:55
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2025
okJiang added 4 commits May 22, 2025 15:36
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
@okJiang
Copy link
Member Author
okJiang commented May 22, 2025

/retest

1 similar comment
@okJiang
Copy link
Member Author
okJiang commented May 22, 2025

/retest

okJiang added 3 commits May 23, 2025 11:03
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
@okJiang
Copy link
Member Author
okJiang commented May 26, 2025

/retest

1 similar comment
@okJiang
Copy link
Member Author
okJiang commented May 26, 2025

/retest

@okJiang
Copy link
Member Author
okJiang commented May 26, 2025

/retest

1 similar comment
@okJiang
Copy link
Member Author
okJiang commented May 26, 2025

/retest

8000
Copy link
codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 32 lines in your changes missing coverage. Please review.

Project coverage is 76.09%. Comparing base (04f1ae0) to head (9ff1f55).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9333      +/-   ##
==========================================
+ Coverage   75.98%   76.09%   +0.10%     
==========================================
  Files         473      479       +6     
  Lines       73625    74308     +683     
==========================================
+ Hits        55945    56544     +599     
- Misses      14181    14247      +66     
- Partials     3499     3517      +18     
Flag Coverage Δ
unittests 76.09% <90.47%> (+0.10%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: okJiang <819421878@qq.com>
Comment on lines 99 to 103
if dur < minSpeedCalculationWindow {
dur = minSpeedCalculationWindow
} else if dur > maxSpeedCalculationWindow {
dur = maxSpeedCalculationWindow
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to put two warn logs here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM

}
}
})
if p.completeAt.Before(time.Now().Add(-exactExpiredTime)) {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps call time.Now() outside the loop.

Signed-off-by: okJiang <819421878@q
6D40
q.com>
@okJiang
Copy link
Member Author
okJiang commented May 28, 2025

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The last moments of offline store and online store progress are not displayed correctly
2 participants
0