Skip to content

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

Merged
merged 5 commits into from
Aug 4, 2025
Merged

Conversation

showuon
Copy link
Member

@showuon showuon commented Jul 24, 2025

Along with the change: #17952
(KIP-966),
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]

@showuon
Copy link
Member Author

showuon commented Jul 24, 2025

@CalvinConfluent @mumrah @cmccabe, please take a look. Thanks.

Copy link
Contributor

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chia7712
Copy link
Member


> Task :clients:checkstyleMain
[ant:checkstyle] [ERROR] /home/chia7712/project/kafka/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:185:223: ';' is preceded with whitespace. [NoWhitespaceBefore]

> Task :clients:checkstyleMain FAILED

@showuon could you please fix the build error

Copy link
Contributor

@fvaleri fvaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@showuon
Copy link
Member Author

showuon commented Jul 28, 2025

@chia7712 @mimaison , could you have a look when available? I think we should add this in v4.1.0 doc. Thanks.

@mimaison
Copy link
Member

Thanks for the PR!
While this is an improvement, I still find the new description not very clear. I'll try to make suggestions in the next couple of days.

Copy link
Contributor

@CalvinConfluent CalvinConfluent left a 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

Copy link
Member

@mimaison mimaison left a 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

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>
Copy link
Member

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

Copy link
Contributor

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 ?

Copy link
Member Author

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>
Copy link
Member

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?

Copy link
Member Author

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Copy link
Contributor

@junrao junrao left a 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>
Copy link
Contributor

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.

Copy link
Member Author

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>
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Contributor

@junrao junrao left a 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>
Copy link
Contributor

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.

Copy link
Member Author

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>
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@junrao junrao left a 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

@chia7712 chia7712 merged commit 657b496 into apache:trunk Aug 4, 2025
27 checks passed
@chia7712
Copy link
Member

chia7712 commented Aug 4, 2025

@mimaison Should we backport it to 4.1?

@mimaison
Copy link
Member

mimaison commented Aug 4, 2025

Yes this needs backporting to 4.1. Go ahead if you can, otherwise I'll do it tomorrow morning my time. Thanks!

chia7712 pushed a commit that referenced this pull request Aug 4, 2025
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]>
@chia7712
Copy link
Member

chia7712 commented Aug 4, 2025

Yes this needs backporting to 4.1. Go ahead if you can, otherwise I'll do it tomorrow morning my time. Thanks!

done cdc7a4e

airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Aug 6, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants