-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
placement: supports follower role with evict-leader hint #47307
Conversation
e332dec
to
2c38ba7
Compare
Signed-off-by: nolouch <[email protected]>
2c38ba7
to
cdc5546
Compare
/retest-required |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47307 +/- ##
================================================
+ Coverage 72.9347% 72.9888% +0.0541%
================================================
Files 1340 1373 +33
Lines 400476 409956 +9480
================================================
+ Hits 292086 299222 +7136
- Misses 89447 91903 +2456
+ Partials 18943 18831 -112
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest-required |
Signed-off-by: nolouch <[email protected]>
76f5e42
to
f6a1f59
Compare
PTAL @CabinfeverB |
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, but I was wondering if the user uses # as part of the label, it may have a problem. It's better to add the notice in the doc.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rleungx, xhebox 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 |
What problem does this PR solve?
Issue Number: close #46304
Problem Summary:
Currently, all
FOLLOWER_CONSTRAINTS
will set the role in the rule to bevoter
. It can cover major scenarios and reduce the user's burden. but in some scenarios cannot cover, like:there are three az, zone1, zone2, zone3. the user wants the replicas in zone 1 and zone 2 can be the leader, and normal situations, the leader should be placed in zone 1, if zone 1 is gone, the leader is better in zone 2. and zone3 reject be the leader, zone 3 can be seen as a backup zone, it's not used to serve.
maybe we can enhance the
FOLLOWER_CONSTRAINTS
, likeadd attribute
#evict-leader
explains voters should be followers, and reject becoming leaders.full SQL will like this:
alternative plan
warn: this is the current easy way to achieve this issue scenario. we would be supported
leader_preferences
in the future to define the leader choice priority.What is changed and how it works?
add new keywords.
Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.