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

client/http: add scheduleUpdateMembersInfo to get the latest members ASAP #7675

Closed
wants to merge 2 commits into from

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Jan 8, 2024

What problem does this PR solve?

Issue Number: ref #7300, #7673.

What is changed and how does it work?

Add `scheduleUpdateMembersInfo` to get the latest members ASAP.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato added the component/client Client logic. label Jan 8, 2024
@JmPotato JmPotato requested review from rleungx and HuSharp January 8, 2024 03:43
Copy link
Contributor

ti-chi-bot bot commented Jan 8, 2024

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 8, 2024
@@ -268,6 +286,7 @@ func (ci *clientInner) membersInfoUpdater(ctx context.Context) {
log.Info("[pd] http client member info updater stopped", zap.String("source", ci.source))
return
case <-ticker.C:
case <-ci.updateMembersInfoNotifier:
Copy link
Contributor

Choose a reason for hiding this comment

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

fallthrough

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
}
log.Debug("[pd] request follower addr failed",
zap.String("source", ci.source), zap.Int("idx", idx), zap.String("addr", addr), zap.Error(err))
}
// Schedule the members info update if all the requests failed to get the latest members as soon as possible.
ci.scheduleUpdateMembersInfo()
Copy link
Member

Choose a reason for hiding this comment

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

better using retry mechanism

Copy link
Member

Choose a reason for hiding this comment

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

After using ServiceDiscovery, we can use ScheduleCheckMemberChanged. How about waiting for #7668

@JmPotato
Copy link
Member Author

JmPotato commented Jan 8, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2024
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Merging #7675 (77d69d4) into master (c3ad361) will increase coverage by 0.09%.
Report is 13 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7675      +/-   ##
==========================================
+ Coverage   73.72%   73.82%   +0.09%     
==========================================
  Files         429      429              
  Lines       47379    47389      +10     
==========================================
+ Hits        34931    34985      +54     
+ Misses       9439     9416      -23     
+ Partials     3009     2988      -21     
Flag Coverage Δ
unittests 73.82% <100.00%> (+0.09%) ⬆️

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

Copy link
Contributor

ti-chi-bot bot commented Jan 13, 2024

PR needs rebase.

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2024
@JmPotato JmPotato closed this Jan 13, 2024
@JmPotato JmPotato deleted the refine_retry branch January 13, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/client Client logic. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants