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) #5978

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved type/cherry-pick-for-release-6.1 This PR is cherry-picked to release-6.1 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.52% // Head: 75.56% // Increases project coverage by +0.03% 🎉

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

Additional details and impacted files
@@               Coverage Diff               @@
##           release-6.1    #5978      +/-   ##
===============================================
+ Coverage        75.52%   75.56%   +0.03%     
===============================================
  Files              307      307              
  Lines            30485    30484       -1     
===============================================
+ Hits             23025    23034       +9     
+ Misses            5464     5462       -2     
+ Partials          1996     1988       -8     
Flag Coverage Δ
unittests 75.56% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 82.61% <100.00%> (-0.02%) ⬇️
pkg/dashboard/adapter/manager.go 81.60% <0.00%> (-4.60%) ⬇️
server/election/leadership.go 73.19% <0.00%> (-4.13%) ⬇️
pkg/etcdutil/etcdutil.go 86.20% <0.00%> (-2.30%) ⬇️
server/member/member.go 62.10% <0.00%> (-2.11%) ⬇️
client/base_client.go 80.41% <0.00%> (-2.07%) ⬇️
server/tso/allocator_manager.go 64.89% <0.00%> (-1.50%) ⬇️
server/election/lease.go 84.05% <0.00%> (-1.45%) ⬇️
server/schedule/operator_controller.go 85.54% <0.00%> (-0.21%) ⬇️
server/cluster/unsafe_recovery_controller.go 78.55% <0.00%> (ø)
... and 15 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: a6de757

@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 8bc2e28 into tikv:release-6.1 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 Feb 28, 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.1 This PR is cherry-picked to release-6.1 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants