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: fix service_scope replaced #49246

Merged
merged 3 commits into from
Dec 12, 2023
Merged

Conversation

ywqzzy
Copy link
Contributor

@ywqzzy ywqzzy commented Dec 7, 2023

What problem does this PR solve?

Issue Number: close #49245

Problem Summary:
recover in manager may replace the meta.

What changed and how does it work?

Only if meta row of tidbID is empty, insert the meta.

Check List

Tests

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

run 3 tasks.
task1: set tidb1 labeled as "", no tidb2.
task2: set tidb2 labeled as "background"
task3: set tidb1 labeled as "background"

mysql> mysql> select task_key,exec_id,state from mysqlackground_subtask_history;
+----------+--------------------+---------+
| task_key | exec_id            | state   |
+----------+--------------------+---------+
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 1        | 127.0.0.1:4000     | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 2        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
| 3        | 192.168.0.100:8023 | succeed |
| 3        | 127.0.0.1:4000     | succeed |
+----------+--------------------+---------+

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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2023
Copy link

tiprow bot commented Dec 7, 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 disttask: fix service_scope replaced [WIP]disttask: fix service_scope replaced Dec 7, 2023
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 7, 2023
@ywqzzy ywqzzy changed the title [WIP]disttask: fix service_scope replaced disttask: fix service_scope replaced Dec 7, 2023
@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 Dec 7, 2023
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Merging #49246 (696fcb8) into master (a7260ff) will increase coverage by 0.8857%.
Report is 4 commits behind head on master.
The diff coverage is 75.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49246        +/-   ##
================================================
+ Coverage   71.0539%   71.9396%   +0.8857%     
================================================
  Files          1368       1410        +42     
  Lines        401806     414582     +12776     
================================================
+ Hits         285499     298249     +12750     
- Misses        96449      97522      +1073     
+ Partials      19858      18811      -1047     
Flag Coverage Δ
integration 43.8859% <75.0000%> (?)
unit 71.0567% <ø> (+0.0027%) ⬆️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 48.0529% <ø> (-4.9086%) ⬇️

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-triage-completed labels Dec 7, 2023
Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 7, 2023
Copy link

ti-chi-bot bot commented Dec 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, zimulala

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 Dec 11, 2023
Copy link

ti-chi-bot bot commented Dec 11, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-07 07:28:07.37809574 +0000 UTC m=+1685316.043322060: ☑️ agreed by Benjamin2037.
  • 2023-12-11 09:40:28.663670905 +0000 UTC m=+262719.700897828: ☑️ agreed by zimulala.

Copy link

tiprow bot commented Dec 11, 2023

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

Test name Commit Details Required Rerun command
tiprow_fast_test 2da286c link true /test tiprow_fast_test

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
Copy link
Contributor Author

ywqzzy commented Dec 11, 2023

/hold

@ti-chi-bot ti-chi-bot bot added 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. labels Dec 11, 2023
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
@ywqzzy
Copy link
Contributor Author

ywqzzy commented Dec 12, 2023

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2023
@ti-chi-bot ti-chi-bot bot merged commit 631ce09 into pingcap:master Dec 12, 2023
@ti-chi-bot
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. 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.

tidb_service_scope won't take effect after 90s
4 participants