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

disttask/ddl: add retry for sessionExpired #48545

Closed
wants to merge 10 commits into from

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Nov 13, 2023

What problem does this PR solve?

Issue Number: close #48546

Problem Summary:
When trying to acquire dist lock on etcd, we might encounter sessionExpired error.

What is changed and how it works?

  1. Add retry backoffer to acquire lock.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Copy link

ti-chi-bot bot commented Nov 13, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 13, 2023
Copy link

tiprow bot commented Nov 13, 2023

Hi @ywqzzy. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@ywqzzy ywqzzy changed the title fix some bugs disttask/ddl: fix some bugs Nov 13, 2023
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 15, 2023
Copy link

ti-chi-bot bot commented Nov 15, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign benjamin2037 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@ywqzzy ywqzzy changed the title disttask/ddl: fix some bugs disttask/ddl: add retry for sessionExpired Nov 15, 2023
@ywqzzy ywqzzy marked this pull request as ready for review November 15, 2023 08:25
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Merging #48545 (eb69138) into master (1bb8b6f) will increase coverage by 1.2702%.
Report is 42 commits behind head on master.
The diff coverage is 4.0000%.

❗ Current head eb69138 differs from pull request most recent head d628cb3. Consider uploading reports for the commit d628cb3 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48545        +/-   ##
================================================
+ Coverage   71.4240%   72.6942%   +1.2702%     
================================================
  Files          1404       1382        -22     
  Lines        407213     410167      +2954     
================================================
+ Hits         290848     298168      +7320     
+ Misses        96412      93119      -3293     
+ Partials      19953      18880      -1073     
Flag Coverage Δ
integration 43.0561% <0.0000%> (?)

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

Components Coverage Δ
dumpling 53.9874% <ø> (ø)
parser ∅ <ø> (∅)
br 48.7955% <ø> (-4.2900%) ⬇️

} else {

// for dist task, we Register BackCtx in backfillDistScheduler.Init.
if !variable.EnableDistTask.Load() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove the Register() code here. Later I will file a PR to implement "only one task can run at the same time".

Copy link
Contributor

Choose a reason for hiding this comment

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

@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 Nov 17, 2023
Copy link

ti-chi-bot bot commented Nov 17, 2023

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.

pkg/ddl/ingest/backend.go Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Nov 21, 2023

@ywqzzy: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/mysql-test d628cb3 link true /test mysql-test
idc-jenkins-ci-tidb/build d628cb3 link true /test build
idc-jenkins-ci-tidb/check_dev_2 d628cb3 link true /test check-dev2
idc-jenkins-ci-tidb/unit-test d628cb3 link true /test unit-test
idc-jenkins-ci-tidb/check_dev d628cb3 link true /test check-dev

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@ywqzzy ywqzzy closed this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-triage-completed 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
2 participants