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: retry checkServiceModeChanged to make tso client work normal #8963

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Dec 31, 2024

What problem does this PR solve?

Issue Number: Close #8962

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 31, 2024
@okJiang
Copy link
Member Author

okJiang commented Dec 31, 2024

/retest

2 similar comments
@okJiang
Copy link
Member Author

okJiang commented Dec 31, 2024

/retest

@okJiang
Copy link
Member Author

okJiang commented Jan 2, 2025

/retest

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.33%. Comparing base (41919ad) to head (eba00d7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8963      +/-   ##
==========================================
+ Coverage   76.31%   76.33%   +0.02%     
==========================================
  Files         465      465              
  Lines       70547    70548       +1     
==========================================
+ Hits        53839    53856      +17     
+ Misses      13361    13344      -17     
- Partials     3347     3348       +1     
Flag Coverage Δ
unittests 76.33% <0.00%> (+0.02%) ⬆️

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

@okJiang
Copy link
Member Author

okJiang commented Jan 2, 2025

/cc @JmPotato @rleungx

@ti-chi-bot ti-chi-bot bot requested review from JmPotato and rleungx January 2, 2025 03:47
if err := c.checkServiceModeChanged(); err != nil {
log.Warn("[pd] failed to check service mode and will check later", zap.Error(err))
if err := c.initRetry(c.checkServiceModeChanged); err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

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

One more thing, we need to handle cancel properly.

Copy link
Member Author

Choose a reason for hiding this comment

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

which cancel?

Copy link
Member

Choose a reason for hiding this comment

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

See line 499 and line 495, but I find the caller will also call cancel.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added 81261bd

Signed-off-by: okJiang <[email protected]>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 3, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, rleungx

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 6, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-03 06:19:29.905275986 +0000 UTC m=+676905.261280525: ☑️ agreed by JmPotato.
  • 2025-01-06 05:14:24.513235295 +0000 UTC m=+157807.802067000: ☑️ agreed by rleungx.

@okJiang
Copy link
Member Author

okJiang commented Jan 6, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit 6a0ed86 into tikv:master Jan 6, 2025
23 of 25 checks passed
@okJiang okJiang deleted the retry-init-tso-client branch January 6, 2025 06:01
@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Jan 6, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #8974.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8975.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8976.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jan 6, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Jan 6, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Jan 6, 2025
ti-chi-bot bot added a commit that referenced this pull request Jan 6, 2025
…8963) (#8974)

close #8962

Signed-off-by: okJiang <[email protected]>

Co-authored-by: okJiang <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tso client is not ready after create PD client
4 participants