-
Notifications
You must be signed in to change notification settings - Fork 501
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
add store labels #3784
add store labels #3784
Conversation
Co-authored-by: Lonng <heng@lonng.org>
Co-authored-by: Lonng <heng@lonng.org>
Co-authored-by: Lonng <heng@lonng.org>
@L3T Could you please fix the CI and update the test result in the PR description? |
Codecov Report
@@ Coverage Diff @@
## master #3784 +/- ##
=======================================
Coverage 62.35% 62.35%
=======================================
Files 169 169
Lines 17962 17962
=======================================
Hits 11200 11200
Misses 5677 5677
Partials 1085 1085
|
/run-all-tests |
@L3T Please fix the CI. |
/run-all-tests |
/run-all-tests |
@L3T There is not location labels in the test result, could you please verify the case including the location labels and customized labels? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -816,8 +816,8 @@ func (m *tikvMemberManager) setStoreLabelsForTiKV(tc *v1alpha1.TidbCluster) (int | |||
return setCount, err | |||
} | |||
|
|||
locationLabels := []string(config.Replication.LocationLabels) | |||
if locationLabels == nil { | |||
storeLabels := append(config.Replication.LocationLabels, tc.Spec.TiKV.StoreLabels...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are some duplicated labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里重复的话,下面逻辑都是根据 storeLabels 对 map 赋值,所以对下面逻辑不会有影响,改了还要多几行代码(,这里就不改了吧(
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: cd5caca
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-1.1 in PR #3813 |
* cherry pick #3784 to release-1.1 Signed-off-by: ti-srebot <ti-srebot@pingcap.com> * resolve conflict Co-authored-by: zyy <zhangyunyu@zhihu.com> Co-authored-by: DanielZhangQD <zhanghailong810@aliyun.com> Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
What problem does this PR solve?
Fix #3783
What is changed and how does it work?
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.