This is an automated email from the ASF dual-hosted git repository.
cmccabe pushed a commit to branch 3.9
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.9 by this push:
new 28f5ff6039b KAFKA-17412: add doc for `unclean.leader.election.enable`
in KRaft (#17051)
28f5ff6039b is described below
commit 28f5ff6039be9c75f7d53e4119613acd4517ce55
Author: Luke Chen <[email protected]>
AuthorDate: Wed Sep 4 08:11:46 2024 +0900
KAFKA-17412: add doc for `unclean.leader.election.enable` in KRaft (#17051)
Reviewers: Colin P. McCabe <[email protected]>
---
.../src/main/java/org/apache/kafka/common/config/TopicConfig.java | 4 +++-
docs/upgrade.html | 3 +++
.../main/java/org/apache/kafka/server/config/ReplicationConfigs.java | 5 ++++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
index b3cea19c551..1437577ed00 100755
--- a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
+++ b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
@@ -165,7 +165,9 @@ public class TopicConfig {
public static final String UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG =
"unclean.leader.election.enable";
public static final String UNCLEAN_LEADER_ELECTION_ENABLE_DOC = "Indicates
whether to enable replicas " +
"not in the ISR set to be elected as leader as a last resort, even
though doing so may result in data " +
- "loss.";
+ "loss.<p>Note: In KRaft mode, when enabling this config dynamically,
it needs to wait for the unclean leader election" +
+ "thread to trigger election periodically (default is 5 minutes).
Please run `kafka-leader-election.sh` with `unclean` option " +
+ "to trigger the unclean leader election immediately if needed.</p>";
public static final String MIN_IN_SYNC_REPLICAS_CONFIG =
"min.insync.replicas";
public static final String MIN_IN_SYNC_REPLICAS_DOC = "When a producer
sets acks to \"all\" (or \"-1\"), " +
diff --git a/docs/upgrade.html b/docs/upgrade.html
index 95e94515a23..049a8b4f9ae 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -32,6 +32,9 @@
See <a
href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-950%3A++Tiered+Storage+Disablement">KIP-950</a>
for more details.</li>
<li>Tiered storage quota is implemented. Users can set an "upper
bound" on the rate at which logs are copied/read to/from the remote storage.
See <a
href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-956+Tiered+Storage+Quotas">KIP-956</a>
for more details.</li>
+ <li><code>unclean.leader.election.enable</code> config is supported in
KRaft. Compared with ZK mode, there is one behavior change in KRaft mode
+ when dynamically enabling
<code>unclean.leader.election.enable</code> config. Please check
+ <a
href="https://kafka.apache.org/documentation/#brokerconfigs_unclean.leader.election.enable">here</a>
for more details.</li>
</ul>
<h4><a id="upgrade_3_8_0" href="#upgrade_3_8_0">Upgrading to 3.8.0 from any
version 0.8.x through 3.7.x</a></h4>
diff --git
a/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java
b/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java
index 3bce284e47b..5106b81025f 100644
---
a/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java
+++
b/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java
@@ -122,7 +122,10 @@ public class ReplicationConfigs {
public static final String UNCLEAN_LEADER_ELECTION_INTERVAL_MS_DOC = "The
frequency with which the controller checks if it should perform an unclean
leader election for leaderless partitions.";
public static final String UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG =
ServerTopicConfigSynonyms.serverSynonym(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG);
- public static final String UNCLEAN_LEADER_ELECTION_ENABLE_DOC = "Indicates
whether to enable replicas not in the ISR set to be elected as leader as a last
resort, even though doing so may result in data loss";
+ public static final String UNCLEAN_LEADER_ELECTION_ENABLE_DOC = "Indicates
whether to enable replicas not in the ISR set to be elected as leader as a last
resort, even though doing so may result in data loss" +
+ "<p>Note: In KRaft mode, when enabling this config dynamically, it
needs to wait for the unclean leader election " +
+ "thread to trigger election periodically (default is 5 minutes).
Please run `kafka-leader-election.sh` with `unclean` option " +
+ "to trigger the unclean leader election immediately if
needed.</p>";
public static final String INTER_BROKER_PROTOCOL_VERSION_CONFIG =
"inter.broker.protocol.version";
public static final String INTER_BROKER_PROTOCOL_VERSION_DEFAULT =
MetadataVersion.latestProduction().version();