This is an automated email from the ASF dual-hosted git repository.

showuon pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b6fce13e3a6 KAFKA-19460: Improve documentation of fetch.min.bytes and 
replica.fetch.min.bytes (#20111)
b6fce13e3a6 is described below

commit b6fce13e3a67750503e28e978ed8cf847429a3c0
Author: yangxuze <40695545+popsunl...@users.noreply.github.com>
AuthorDate: Mon Jul 14 12:57:15 2025 +0800

    KAFKA-19460: Improve documentation of fetch.min.bytes and 
replica.fetch.min.bytes (#20111)
    
    While walking through the source code I confirmed that the broker checks
    `replica.fetch.min.bytes` exactly the same way it checks
    `fetch.min.bytes`, so this patch updates the wording for both config
    keys.
    
    Co-authored-by: yangxuze <xuze_y...@163.com>
    
    Reviewers: Luke Chen <show...@gmail.com>
---
 .../src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java | 2 +-
 .../main/java/org/apache/kafka/server/config/ReplicationConfigs.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java 
b/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
index 09ce436c81e..7700090ccef 100644
--- 
a/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
+++ 
b/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
@@ -186,7 +186,7 @@ public class ConsumerConfig extends AbstractConfig {
      */
     public static final String FETCH_MIN_BYTES_CONFIG = "fetch.min.bytes";
     public static final int DEFAULT_FETCH_MIN_BYTES = 1;
-    private static final String FETCH_MIN_BYTES_DOC = "The minimum amount of 
data the server should return for a fetch request. If insufficient data is 
available the request will wait for that much data to accumulate before 
answering the request. The default setting of " + DEFAULT_FETCH_MIN_BYTES + " 
byte means that fetch requests are answered as soon as that many byte(s) of 
data is available or the fetch request times out waiting for data to arrive. 
Setting this to a larger value will c [...]
+    private static final String FETCH_MIN_BYTES_DOC = "The minimum amount of 
data the server should return for a fetch request. If insufficient data is 
available the request will wait for that much data to accumulate before 
answering the request. The default setting of " + DEFAULT_FETCH_MIN_BYTES + " 
byte means that fetch requests are answered as soon as that many byte(s) of 
data is available or the fetch request times out waiting for data to arrive. 
Setting this to a larger value will c [...]
 
     /**
      * <code>fetch.max.bytes</code>
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 43453e33a8b..b193fdc7090 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
@@ -70,7 +70,7 @@ public class ReplicationConfigs {
 
     public static final String REPLICA_FETCH_MIN_BYTES_CONFIG = 
"replica.fetch.min.bytes";
     public static final int REPLICA_FETCH_MIN_BYTES_DEFAULT = 1;
-    public static final String REPLICA_FETCH_MIN_BYTES_DOC = "Minimum bytes 
expected for each fetch response. If not enough bytes, wait up to 
<code>replica.fetch.wait.max.ms</code> (broker config).";
+    public static final String REPLICA_FETCH_MIN_BYTES_DOC = "Minimum bytes 
expected for each fetch response. If not enough bytes, wait up to 
<code>replica.fetch.wait.max.ms</code> (broker config). Even if the total data 
available in the broker exceeds replica.fetch.min.bytes, the actual returned 
size may still be less than this value due to per-partition limits 
replica.fetch.max.bytes and max returned limits 
replica.fetch.response.max.bytes";
 
     public static final String REPLICA_FETCH_BACKOFF_MS_CONFIG = 
"replica.fetch.backoff.ms";
     public static final int REPLICA_FETCH_BACKOFF_MS_DEFAULT = 1000;

Reply via email to