Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The current documentation for `fetch.min.bytes` says:
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 1 byte means that fetch requests are answered as soon as a single byte of data is available or the fetch request times out waiting for data to arrive. Setting this to something greater than 1 will cause the server to wait for larger amounts of data to accumulate which can improve server throughput a bit at the cost of some additional latency.
The highlighted sentence made me believe that Kafka would start waiting, and as soon as enough data was available would stop waiting and return. In reality the behavior is that Kafka will check for enough data, and if there isn't will wait the full `fetch.max.wait.ms` time.
I would propose rewording the sentence to make that clearer, for example:
"If insufficient data is available the request will wait for `fetch.max.wait.ms` before answering the request."