-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MINOR: improve the min.insync.replicas doc #20237
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
Conversation
@CalvinConfluent @mumrah @cmccabe, please take a look. Thanks. |
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
@showuon could you please fix the build error |
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. Thanks.
Thanks for the PR! |
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.
Thanks for the PR! 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.
Thanks for the PR. I made a few suggestions
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
Outdated
Show resolved
Hide resolved
docs/ops.html
Outdated
all the ELR fields will be cleaned.</p> | ||
Note that when the ELR feature is enabled: | ||
<ul> | ||
<li>The override of <code>min.insync.replicas</code> in broker-level will be removed.</li> |
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.
will be removed
-> is removed
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.
We probably also want to warn the users that if they previously only set min.insync.replicas at the broker level, once they enable ELR, this info will be lost and they need to reset that at the cluster level.
Is the above correct @CalvinConfluent ?
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.
Added
The previously set <code>min.insync.replicas</code> value at the broker-level config will be removed.
docs/ops.html
Outdated
<li>The override of <code>min.insync.replicas</code> in broker-level will be removed.</li> | ||
<li>The alter of <code>min.insync.replicas</code> config in broker-level is not allowed.</li> | ||
<li>The removal of <code>min.insync.replicas</code> config in cluster-level is not allowed.</li> | ||
<li>If <code>min.insync.replicas</code> is updated for a topic, the ELR field will be cleaned.</li> |
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.
Can we switch to present tense? Also what does will be cleaned
means exactly?
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.
It means the ELR state in the controller side will be empty(reset) because the new updated min ISR makes the existing ELR state invalid. @CalvinConfluent , is my understanding correct?
Is it hard to understand for users? Maybe change to
If <code>min.insync.replicas</code> is updated for a topic, the ELR state will be reset.
?
docs/ops.html
Outdated
<li>The alter of <code>min.insync.replicas</code> config in broker-level is not allowed.</li> | ||
<li>The removal of <code>min.insync.replicas</code> config in cluster-level is not allowed.</li> | ||
<li>If <code>min.insync.replicas</code> is updated for a topic, the ELR field will be cleaned.</li> | ||
<li>If the cluster default <code>min.insync.replicas</code> is updated, all the ELR fields will be cleaned.</li> |
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.
Ditto
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.
@showuon : Thanks for the updated PR. A couple of minor comments.
docs/ops.html
Outdated
<ul> | ||
<li>The cluster-level <code>min.insync.replicas</code> config will be added if there is not any. The value is the same as the static config in the active controller.</li> | ||
<li>The previously set <code>min.insync.replicas</code> value at the broker-level config will be removed.</li> | ||
<li>The override of <code>min.insync.replicas</code> in broker-level will be removed.</li> |
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 above two line are basically the same. We can just keep one. But it will be useful to inform the user to reset min.insync.replicas as the cluster level if it's previously set only at the broker level.
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.
Removed the L4506, and updated to:
The previously set <code>min.insync.replicas</code> value at the broker-level config will be removed. Please set in the cluster-level if necessary.
docs/ops.html
Outdated
<li>The alteration of <code>min.insync.replicas</code> config in broker-level is not allowed.</li> | ||
<li>The removal of <code>min.insync.replicas</code> config in cluster-level is not allowed.</li> | ||
<li>If <code>min.insync.replicas</code> is updated for a topic, the ELR field will be cleaned.</li> | ||
<li>If the cluster default <code>min.insync.replicas</code> is updated, all the ELR fields will be cleaned.</li> |
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.
nit: A ClearElrRecord
is created even when the min.insync.replicas
value remains unchanged. Perhaps we could either document the behavior or consider skipping the record generation in such case.
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.
Good point. Added:
If the cluster-level <code>min.insync.replicas</code> is updated, even if the value is unchanged, all the ELR state will be cleaned.
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.
@showuon : Thanks for the updated PR. A couple of more comments.
docs/ops.html
Outdated
<p>Note that when the ELR feature is enabled:</p> | ||
<ul> | ||
<li>The cluster-level <code>min.insync.replicas</code> config will be added if there is not any. The value is the same as the static config in the active controller.</li> | ||
<li>The removal of <code>min.insync.replicas</code> config in cluster-level is not allowed.</li> |
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.
in cluster-level => at cluster-level Ditto below.
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.
Updated in the commit: 7095773.
docs/ops.html
Outdated
<li>The cluster-level <code>min.insync.replicas</code> config will be added if there is not any. The value is the same as the static config in the active controller.</li> | ||
<li>The removal of <code>min.insync.replicas</code> config in cluster-level is not allowed.</li> | ||
<li>If the cluster-level <code>min.insync.replicas</code> is updated, even if the value is unchanged, all the ELR state will be cleaned.</li> | ||
<li>The previously set <code>min.insync.replicas</code> value at the broker-level config will be removed. Please set in the cluster-level if necessary.</li> |
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.
Should we point out that users may need to take some actions with ELR enabled in upgrade.html too?
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.
Good point! In the Notable changes in 4.1.0
section, added:
The KIP-966 part 1: Eligible Leader Replicas(ELR) will be enabled by default on the new clusters. After the ELR feature enabled, the previously set
min.insync.replicas
value at the broker-level config will be removed. Please set at the cluster-level if necessary. For further details, please refer to here.
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.
@showuon : Thanks for the updated PR. LGTM
@mimaison Should we backport it to 4.1? |
Yes this needs backporting to 4.1. Go ahead if you can, otherwise I'll do it tomorrow morning my time. Thanks! |
Along with the change: #17952 ([KIP-966](https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas)), the semantics of `min.insync.replicas` config has small change, and add some constraints. We should document them clearly. Reviewers: Jun Rao <[email protected]>, Calvin Liu <[email protected]>, Mickael Maison <[email protected]>, Paolo Patierno <[email protected]>, Federico Valeri <[email protected]>, Chia-Ping Tsai <[email protected]>
done cdc7a4e |
Along with the change: apache#17952 ([KIP-966](https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas)), the semantics of `min.insync.replicas` config has small change, and add some constraints. We should document them clearly. Reviewers: Jun Rao <[email protected]>, Calvin Liu <[email protected]>, Mickael Maison <[email protected]>, Paolo Patierno <[email protected]>, Federico Valeri <[email protected]>, Chia-Ping Tsai <[email protected]>
Along with the change: #17952
(KIP-966),
the semantics of
min.insync.replicas
config has small change, and addsome constraints. We should document them clearly.
Reviewers: Jun Rao [email protected], Calvin Liu [email protected],
Mickael Maison [email protected], Paolo Patierno
[email protected], Federico Valeri [email protected], Chia-Ping
Tsai [email protected]