From f2cbc7e3f20c1d4aff9abe216b985c1d9a3a72cc Mon Sep 17 00:00:00 2001 From: Federico Valeri Date: Thu, 17 Jul 2025 04:41:28 +0200 Subject: [PATCH] MINOR: KafkaRaftClient cleanup (#20161) Various minor cleanups for the KRaft client. --------- Signed-off-by: Federico Valeri Reviewers: Luke Chen --- .../main/java/org/apache/kafka/raft/KafkaRaftClient.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java b/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java index 970ee2d6910..f27732d50a3 100644 --- a/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java +++ b/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java @@ -133,7 +133,7 @@ import static org.apache.kafka.snapshot.Snapshots.BOOTSTRAP_SNAPSHOT_ID; * * Like Zookeeper, this protocol distinguishes between voters and observers. Voters are * the only ones who are eligible to handle protocol requests and they are the only ones - * who take part in elections. The protocol does not yet support dynamic quorum changes. + * who take part in elections. * * These are the APIs in this protocol: * @@ -167,10 +167,9 @@ import static org.apache.kafka.snapshot.Snapshots.BOOTSTRAP_SNAPSHOT_ID; */ @SuppressWarnings({ "ClassDataAbstractionCoupling", "ClassFanOutComplexity", "ParameterNumber", "NPathComplexity", "JavaNCSS" }) public final class KafkaRaftClient implements RaftClient { - // visible for testing - static final int RETRY_BACKOFF_BASE_MS = 50; private static final int MAX_NUMBER_OF_BATCHES = 10; - public static final int MAX_FETCH_WAIT_MS = 500; + private static final int MAX_FETCH_WAIT_MS = 500; + // visible for testing public static final int MAX_BATCH_SIZE_BYTES = 8 * 1024 * 1024; public static final int MAX_FETCH_SIZE_BYTES = MAX_BATCH_SIZE_BYTES;