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

cluster: fix the merging issue of labels after store reboot #6468

Merged
merged 1 commit into from
May 15, 2023

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented May 15, 2023

What problem does this PR solve?

Issue Number: Close #6467.

What is changed and how does it work?

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

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nolouch
  • 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 bot added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. labels May 15, 2023
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 15, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 15, 2023
@nolouch
Copy link
Contributor

nolouch commented May 15, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented May 15, 2023

@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
Contributor

ti-chi-bot bot commented May 15, 2023

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

Commit hash: 2bf65db

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label May 15, 2023
@ti-chi-bot ti-chi-bot bot merged commit 30f78a5 into tikv:master May 15, 2023
@JmPotato JmPotato deleted the fix_put_store_label_merge branch May 15, 2023 08:43
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request May 15, 2023
@ti-chi-bot
Copy link
Member

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

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 <[email protected]>

Co-authored-by: JmPotato <[email protected]>
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 <[email protected]>
Signed-off-by: JmPotato <[email protected]>

Co-authored-by: JmPotato <[email protected]>
@snowballbear
Copy link

snowballbear commented Dec 6, 2023

I am testing in version v6.5.3.
It turns out that there is only host in the tikv configuration file.
Machine Port Store Status Leaders Regions Capacity Available Labels


10.2.8.3
30167 1 Up 21 43 875.8GiB 226.3GiB {host: h2}
30166 4 Up 11 43 875.8GiB 226.3GiB {host: h2}
30168 5 Up 11 43 875.8GiB 226.3GiB {host: h2}

Pd-ctl modified
» config set location-labels zone,host
Success!
» store label 4 zone=us4 host=k4 --rewrite
pd/api/v1/store/4/label?force=true
Success!
» store label 5 zone=us5 host=k5 --rewrite
pd/api/v1/store/5/label?force=true
Success!
» store label 1 zone=us5 host=k1 --rewrite
pd/api/v1/store/1/label?force=true
Success!

tiup cluster display hwtest1 --labels
Machine Port Store Status Leaders Regions Capacity Available Labels


10.2.8.3
30167 1 Up 15 43 875.8GiB 226.2GiB {host: k1,zone: us5}
30166 4 Up 9 43 875.8GiB 226.2GiB {host: k4,zone: us4}
30168 5 Up 19 43 875.8GiB 226.2GiB {zone: us5,host: k5}

reload
tiup cluster reload hwtest1
tiup cluster display hwtest1 --labels
Machine Port Store Status Leaders Regions Capacity Available Labels


10.2.8.3
30167 1 Up 15 43 875.8GiB 226.3GiB {host: h2,zone: us5}
30166 4 Up 11 43 875.8GiB 226.2GiB {host: h2,zone: us4}
30168 5 Up 17 43 875.8GiB 226.2GiB {zone: us5,host: h2}

After reloading, it was found that the host was restored to its pre-modified state, but the zone was configured. Is this as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. 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.

tikv read only label is lost after tikv restart
5 participants