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

ddl: watch the ddl ownerkey with the createRevision #55692

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

joccau
Copy link
Member

@joccau joccau commented Aug 27, 2024

What problem does this PR solve?

A tidb-server run campaignOwner successfully and become owner. If it watches the owner after the ownerKey is deleted, the watchOwner() will be stuck.
The method to fix it: need to watch the owner since createRevision.

Issue Number: close #54689, ref #54436

Problem Summary:

What changed and how does it work?

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.

Watch the DDL ownerKey since createRevision after campaignOwner and become owner successfully.

@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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.

Project coverage is 56.3741%. Comparing base (df02db0) to head (ac35a00).
Report is 18 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #55692         +/-   ##
=================================================
- Coverage   72.9210%   56.3741%   -16.5469%     
=================================================
  Files          1585       1713        +128     
  Lines        443451     620011     +176560     
=================================================
+ Hits         323369     349526      +26157     
- Misses       100237     246895     +146658     
- Partials      19845      23590       +3745     
Flag Coverage Δ
integration 37.4624% <51.7241%> (?)
unit 71.9127% <79.3103%> (-0.1376%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 52.2561% <ø> (+6.8046%) ⬆️

Signed-off-by: joccau <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. labels Aug 27, 2024
Signed-off-by: joccau <[email protected]>
Signed-off-by: joccau <[email protected]>
pkg/owner/manager.go Outdated Show resolved Hide resolved
pkg/owner/manager.go Outdated Show resolved Hide resolved
@joccau joccau requested a review from D3Hunter August 28, 2024 05:22
pkg/owner/manager.go Outdated Show resolved Hide resolved
pkg/owner/manager.go Outdated Show resolved Hide resolved
pkg/owner/manager_test.go Show resolved Hide resolved
@joccau joccau requested a review from D3Hunter September 2, 2024 10:06
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 3, 2024
Copy link

ti-chi-bot bot commented Sep 4, 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 added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 4, 2024
Copy link

ti-chi-bot bot commented Sep 4, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-03 02:48:12.408198258 +0000 UTC m=+326216.926251181: ☑️ agreed by D3Hunter.
  • 2024-09-04 02:21:01.705553049 +0000 UTC m=+410986.223605972: ☑️ agreed by lance6716.

@joccau
Copy link
Member Author

joccau commented Sep 4, 2024

/test check-dev

Copy link

tiprow bot commented Sep 4, 2024

@joccau: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit 0720ea8 into pingcap:master Sep 4, 2024
23 checks passed
@joccau
Copy link
Member Author

joccau commented Sep 5, 2024

Ref #54436

@D3Hunter D3Hunter mentioned this pull request Sep 14, 2024
74 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiple owner might exist at same time if keys are delete manually
3 participants