Skip to content
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

schedule: placement rules cache reduce cache low usage fit #5879

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

HunDunDM
Copy link
Member

Signed-off-by: HunDunDM hundundm@gmail.com

What problem does this PR solve?

Issue Number: Ref #5864

bestFit uses more memory, but it is rarely used.

What is changed and how does it work?

part of #5860

Only cache bestFits that have been used more than 10 times.

Check List

Tests

  • Unit test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 20, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jan 20, 2023
@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Base: 75.44% // Head: 75.49% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (6f3071b) compared to base (6d23a31).
Patch coverage: 86.66% of modified lines in pull request are covered.

❗ Current head 6f3071b differs from pull request most recent head f574929. Consider uploading reports for the commit f574929 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5879      +/-   ##
==========================================
+ Coverage   75.44%   75.49%   +0.05%     
==========================================
  Files         347      346       -1     
  Lines       35474    35192     -282     
==========================================
- Hits        26763    26569     -194     
+ Misses       6385     6330      -55     
+ Partials     2326     2293      -33     
Flag Coverage Δ
unittests 75.49% <86.66%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
server/schedule/checker/rule_checker.go 82.73% <ø> (+0.40%) ⬆️
server/schedule/placement/fit.go 95.67% <ø> (-0.16%) ⬇️
server/schedule/checker/checker_controller.go 77.52% <69.23%> (-2.96%) ⬇️
server/schedule/placement/region_rule_cache.go 89.36% <100.00%> (+0.59%) ⬆️
server/schedule/placement/rule_manager.go 84.94% <100.00%> (-0.26%) ⬇️
pkg/storage/endpoint/rule.go 83.33% <0.00%> (-11.12%) ⬇️
pkg/tso/local_allocator.go 64.86% <0.00%> (-4.06%) ⬇️
pkg/utils/etcdutil/etcdutil.go 84.88% <0.00%> (-3.49%) ⬇️
pkg/tso/tso.go 69.66% <0.00%> (-3.38%) ⬇️
pkg/tso/allocator_manager.go 63.70% <0.00%> (-2.10%) ⬇️
... and 38 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

Maybe we need more testing on the real cluster or simulater, but given that cache is not on by default, I think we can merge first

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 9, 2023
Copy link
Contributor

@nolouch nolouch left a comment

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 added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 9, 2023
@nolouch
Copy link
Contributor

nolouch commented Feb 9, 2023

/merge

@ti-chi-bot
Copy link
Member

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 6f3071b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 9, 2023
@ti-chi-bot
Copy link
Member

@HunDunDM: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit a3bb320 into tikv:master Feb 9, 2023
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. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants