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

dm: add retry for dm-worker to join dm-master #11701

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

GMHDBJD
Copy link
Contributor

@GMHDBJD GMHDBJD commented Oct 29, 2024

What problem does this PR solve?

ref pingcap/tiup#2464 (comment)

Issue Number: close #4287

What is changed and how it works?

  • add retry for dm-worker to join dm-master

Check List

Tests

  • Manual test (add detailed scripts or steps below)
./tiup-playground nightly --dm-master 1 --dm-worker 1 --dm-worker.binpath /home/gmhdbjd/code/tiflow/bin/dm-worker --without-monitor --db 0 --kv 0 --pd 0 --tiflash 0
Start dm-master instance: v8.4.0-alpha-nightly
Start dm-worker instance: /home/gmhdbjd/code/tiflow/bin/dm-worker

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. area/dm Issues or PRs related to DM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2024
@GMHDBJD
Copy link
Contributor Author

GMHDBJD commented Oct 29, 2024

/retest

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

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

Project coverage is 55.1635%. Comparing base (792da42) to head (993a184).
Report is 1 commits behind head on master.

Additional details and impacted files
Components Coverage Δ
cdc 59.6477% <ø> (-0.0135%) ⬇️
dm 50.0558% <0.0000%> (+0.0307%) ⬆️
engine 53.2279% <ø> (+0.0225%) ⬆️
Flag Coverage Δ
unit 55.1635% <0.0000%> (+0.0079%) ⬆️

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

@@               Coverage Diff                @@
##             master     #11701        +/-   ##
================================================
+ Coverage   55.1556%   55.1635%   +0.0079%     
================================================
  Files          1001       1001                
  Lines        136481     136485         +4     
================================================
+ Hits          75277      75290        +13     
+ Misses        55697      55690         -7     
+ Partials       5507       5505         -2     

@@ -31,6 +31,8 @@ import (
"google.golang.org/grpc/credentials"
)

const retryTimes = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

If there is retry interval wait a while between two tries.

if conn != nil {
conn.Close()
// retry to connect master
for i := 0; i < retryTimes; i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

need to update the comments at line 58

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 29, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Oct 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, lance6716

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-29 08:08:08.567284256 +0000 UTC m=+337201.406439802: ☑️ agreed by lance6716.
  • 2024-10-29 09:59:27.080200445 +0000 UTC m=+343879.919355994: ☑️ agreed by D3Hunter.

@ti-chi-bot ti-chi-bot bot merged commit 44892b2 into pingcap:master Oct 29, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/dm Issues or PRs related to DM. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refine code
4 participants