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

cluster: no more redundant etcd writes when ReportMinResolvedTS is called (#5966) #5979

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #5966

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

What problem does this PR solve?

Issue Number: Close #5965

What is changed and how does it work?

no more redundant etcd writes when SetMinResolvedTS is called

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    • This PR is based on c64be1f
    • Make putStoreLocked called by SetMinResolvedTS slower 7a47041
    • tiup playground v6.5.0 --kv=15 --db=1 --pd=1 --tiflash=0 --pd.binpath=bin/pd-server
    • The problem can be reproduced in grafana
      • image
      • image
    • putStoreLocked was removed in this PR and replaced with c.core.PutStore(newStore), so it can be considered fixed.

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

Fixed an issue where ETCD write delay could cause PD OOM.

@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Feb 13, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

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 do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Feb 13, 2023
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 75.51% // Head: 75.61% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (5ef0e32) compared to base (b04f0a9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-6.5    #5979      +/-   ##
===============================================
+ Coverage        75.51%   75.61%   +0.10%     
===============================================
  Files              330      330              
  Lines            32952    32951       -1     
===============================================
+ Hits             24884    24917      +33     
+ Misses            5911     5885      -26     
+ Partials          2157     2149       -8     
Flag Coverage Δ
unittests 75.61% <100.00%> (+0.10%) ⬆️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 81.87% <100.00%> (+0.41%) ⬆️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
server/storage/hot_region_storage.go 79.23% <0.00%> (-3.83%) ⬇️
pkg/etcdutil/etcdutil.go 84.88% <0.00%> (-3.49%) ⬇️
server/schedule/labeler/rules.go 87.50% <0.00%> (-2.28%) ⬇️
server/region_syncer/client.go 86.56% <0.00%> (-1.50%) ⬇️
server/schedule/hbstream/heartbeat_streams.go 71.71% <0.00%> (-1.02%) ⬇️
pkg/btree/btree_generic.go 86.34% <0.00%> (-0.93%) ⬇️
server/schedule/operator/step.go 73.09% <0.00%> (-0.72%) ⬇️
server/server.go 74.90% <0.00%> (-0.25%) ⬇️
... and 14 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.

@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 14, 2023
@VelocityLight VelocityLight added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Feb 14, 2023
@nolouch
Copy link
Contributor

nolouch commented Feb 14, 2023

/merge

@ti-chi-bot
Copy link
Member Author

@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 Author

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

Commit hash: 5ef0e32

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 14, 2023
@ti-chi-bot ti-chi-bot merged commit d34913b into tikv:release-6.5 Feb 14, 2023
@VelocityLight VelocityLight added do-not-merge/cherry-pick-not-approved cherry-pick-approved Cherry pick PR approved by release team. and removed cherry-pick-approved Cherry pick PR approved by release team. do-not-merge/cherry-pick-not-approved labels Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants