-
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
ddl: defining the placement rule of a leader requires REPLICAS
option
#20813
Conversation
if spec.Replicas == 0 { | ||
spec.Replicas = 1 | ||
} |
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 the user sets it to 0 explicitly?
e.g. leader=role replicas=0
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.
This case has been treated in the parser
.
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.
why not just throw "Invalid placement option REPLICAS, it is should be identified"? @djshow832
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.
The number of leaders can be only 1. It's unnecessary to declare it.
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.
ok
Co-authored-by: djshow832 <zhangming@pingcap.com>
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
if spec.Replicas == 0 { | ||
spec.Replicas = 1 | ||
} |
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.
The number of leaders can be only 1. It's unnecessary to declare it.
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
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
/reward 600 |
You are not the mentor for the linked issue. |
/merge |
/run-all-tests |
@TszKitLo40 merge failed. |
a3a8837
/merge |
/run-all-tests |
@TszKitLo40 merge failed. |
/merge |
/run-all-tests |
/reward 600 |
Reward success. |
@TszKitLo40, Congratulations, you get 600 in this PR, and your total score is 1200 in challenge program. |
What problem does this PR solve?
Issue Number: close #20751
Problem Summary:
What is changed and how it works?
What's Changed:
defining the placement rule of a leader requires
REPLICAS
optionHow it Works:
If the role is leader, set the
replicas
to 1Check List
Tests
Release note