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

*: supports delete store label #5510

Merged
merged 6 commits into from
Sep 16, 2022
Merged

*: supports delete store label #5510

merged 6 commits into from
Sep 16, 2022

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Sep 15, 2022

Signed-off-by: nolouch nolouch@gmail.com

What problem does this PR solve?

Issue Number: Close #5509

What is changed and how does it work?

*: supports store command to delete the specified label

Check List

Tests

  • Unit test

Release note

store command of pdctl supports to delete the specified label for a store

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 15, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 75.58% // Head: 75.48% // Decreases project coverage by -0.10% ⚠️

Coverage data is based on head (fa66b85) compared to base (c1f8731).
Patch coverage: 62.92% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5510      +/-   ##
==========================================
- Coverage   75.58%   75.48%   -0.11%     
==========================================
  Files         320      320              
  Lines       31769    31847      +78     
==========================================
+ Hits        24014    24041      +27     
- Misses       5691     5719      +28     
- Partials     2064     2087      +23     
Flag Coverage Δ
unittests 75.48% <62.92%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
server/api/store.go 66.31% <31.25%> (-1.57%) ⬇️
server/cluster/cluster.go 82.82% <66.66%> (-0.35%) ⬇️
tools/pd-ctl/pdctl/command/store_command.go 64.90% <69.23%> (+0.36%) ⬆️
server/api/router.go 97.93% <100.00%> (+<0.01%) ⬆️
server/config/util.go 86.66% <100.00%> (+0.45%) ⬆️
server/core/store.go 82.43% <100.00%> (ø)
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
...erver/config/service_middleware_persist_options.go 91.66% <0.00%> (-8.34%) ⬇️
server/id/id.go 83.05% <0.00%> (-6.78%) ⬇️
server/storage/kv/etcd_kv.go 79.71% <0.00%> (-5.80%) ⬇️
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: nolouch <nolouch@gmail.com>
server/cluster/cluster.go Outdated Show resolved Hide resolved
tools/pd-ctl/pdctl/command/store_command.go Outdated Show resolved Hide resolved
tools/pd-ctl/pdctl/command/store_command.go Outdated Show resolved Hide resolved
tools/pd-ctl/pdctl/command/store_command.go Outdated Show resolved Hide resolved
tools/pd-ctl/pdctl/command/store_command.go Outdated Show resolved Hide resolved
tools/pd-ctl/pdctl/command/store_command.go Outdated Show resolved Hide resolved
}
labels = append(labels, label)
}
if !hit {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need hit, can check if len(labels) == len(newStore.Labels) instead.

server/cluster/cluster.go Outdated Show resolved Hide resolved
@nolouch
Copy link
Contributor Author

nolouch commented Sep 16, 2022

PTAL @rleungx @CabinfeverB

Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch
Copy link
Contributor Author

nolouch commented Sep 16, 2022

ptal @disksing

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 16, 2022
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 16, 2022
@nolouch
Copy link
Contributor Author

nolouch commented Sep 16, 2022

/merge

@ti-chi-bot
Copy link
Member

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: fa66b85

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 16, 2022
@ti-chi-bot ti-chi-bot merged commit eeb5d3f into tikv:master Sep 16, 2022
ti-chi-bot bot pushed a commit that referenced this pull request May 15, 2023
ref #5510, close #6467

#5510 introduced a bug that would cause the store labels to be overwritten wrongly after the store reboot.
This PR fixed this issue.

Signed-off-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request May 15, 2023
ref tikv#5510, close tikv#6467

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request May 15, 2023
…6470)

ref #5510, close #6467, ref #6468

#5510 introduced a bug that would cause the store labels to be overwritten wrongly after the store reboot.
This PR fixed this issue.

Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request May 15, 2023
…6469)

ref #5510, close #6467, ref #6468

#5510 introduced a bug that would cause the store labels to be overwritten wrongly after the store reboot.
This PR fixed this issue.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To remove one particular label from store via pd-ctl
5 participants