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

fix PD peer svc update repeatly #5015

Merged
merged 1 commit into from
May 23, 2023

Conversation

csuzhangxc
Copy link
Member

@csuzhangxc csuzhangxc commented May 22, 2023

What problem does this PR solve?

in #4973, we refactored the logic of PD service update, after that the PD peer service is updated repeatly.

I0519 09:53:29.198719       1 service_control.go:91] update Service: [default/tc-1-pd-peer] successfully, kind: TidbCluster, name: tc-1
I0519 09:54:29.199537       1 service_control.go:91] update Service: [default/tc-1-pd-peer] successfully, kind: TidbCluster, name: tc-1
I0519 09:55:29.220976       1 service_control.go:91] update Service: [default/tc-1-pd-peer] successfully, kind: TidbCluster, name: tc-1

This is because the service get from the cache may lack the pingcap.com/last-applied-configuration annotation as it is deleted by a previous reconcile. also see #462

delete(oldSvc.Annotations, LastAppliedConfigAnnotation)

if lastAppliedConfig, ok := oldSvc.Annotations[LastAppliedConfigAnnotation]; ok {

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

check not pd-peer service updated log after this fix.

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 22, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • hanlins
  • liubog2008

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 bot requested review from handlerww and liubog2008 May 22, 2023 07:20
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2023

Codecov Report

Merging #5015 (7225b76) into master (e97423e) will increase coverage by 3.79%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5015      +/-   ##
==========================================
+ Coverage   56.95%   60.75%   +3.79%     
==========================================
  Files         243      247       +4     
  Lines       27490    30765    +3275     
==========================================
+ Hits        15658    18691    +3033     
- Misses      10302    10430     +128     
- Partials     1530     1644     +114     
Flag Coverage Δ
e2e 30.79% <100.00%> (?)
unittest 56.96% <100.00%> (+<0.01%) ⬆️

Copy link
Contributor

@hanlins hanlins left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc merged commit eaae778 into pingcap:master May 23, 2023
@csuzhangxc csuzhangxc deleted the fix-pd-peer-svc-update branch May 23, 2023 01:55
@csuzhangxc
Copy link
Member Author

/cherry-pick release-1.5

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 3, 2023

@csuzhangxc: The label(s) /release-1.5 cannot be applied, because the repository doesn't have them.

In response to this:

/cherry-pick release-1.5

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

@csuzhangxc: new pull request created to branch release-1.5: #5122.

In response to this:

/cherry-pick release-1.5

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.

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

Successfully merging this pull request may close these issues.

5 participants