DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: [One of "Under Discussion", "Accepted", "Rejected"] Draft
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA: here [Change the link from KAFKA-1 to your own ticket]
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
Describe the problems you are trying to solve.
Public Interfaces
Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.
A public interface is any change to the following:
Binary log format
The network protocol and api behavior
Any class in the public packages under clientsConfiguration, especially client configuration
org/apache/kafka/common/serialization
org/apache/kafka/common
org/apache/kafka/common/errors
org/apache/kafka/clients/producer
org/apache/kafka/clients/consumer (eventually, once stable)
Monitoring
Command line tools and arguments
- Anything else that will likely break existing users in some way when they upgrade
Proposed Changes
...
The controller quorum fetch loop relies on a timing invariant for correctness and liveness: the maximum fetch wait(currently effectively bounded to ~500 ms) must be significantly smaller than half of the fetch timeout.
In practice, the algorithm makes progress because:
max_fetch_wait (≈ 500 ms) << controller.quorum.fetch.timeout.ms / 2
If operators set an unusually small controller.quorum.fetch.timeout.ms, this invariant can be violated, risking premature timeouts, spurious retries, and degraded stability. To preserve the invariant across configurations and upgrades, we propose to enforce a lower bound of 1000 ms for controller.quorum.fetch.timeout.ms.
Public Interfaces
Configuration change (validation only):
controller.quorum.fetch.timeout.msType: int (ms)
Lower bound: 1000 ms (enforced)
Default: unchanged
Behavior: Values < 1000 ms are invalid and will be rejected with a clear error message.
Proposed Changes
Config validation:
Update the config definition for
controller.quorum.fetch.timeout.msto useatLeast(1000)(or equivalent validation hook).Apply the same validation path for both static startup configs and any dynamic/config-provider paths that may set this value.
Error messaging:
On invalid values, throw a
ConfigExceptionwith actionable guidance, e.g.:“
controller.quorum.fetch.timeout.msmust be ≥ 1000 ms to ensure the controller fetch loop makes progress without violating timing assumptions.”
Documentation:
Update the config reference to document the lower bound and the rationale (ties to fetch-wait timing and controller liveness).
Compatibility, Deprecation, and Migration Plan
- What impact (if any) will there be on existing users?
- If we are changing behavior how will we phase out the older behavior?
- If we need special migration tools, describe them here.
- When will we remove the existing behavior?
Test Plan
Describe in few sentences how the KIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?
Rejected Alternatives
...
Backward compatibility:
Deployments already using values ≥ 1000 ms are unaffected.
Deployments with < 1000 ms will fail fast at startup (or on reconfiguration) with a clear error.
No deprecations; this is a validation tightening to ensure correctness.
Migration:
Operators must raise any sub-1000 ms values to ≥ 1000 ms before/with the upgrade.
Test Plan
Unit tests for config validation (values below/at/above 1000).
Integration test: start controller with invalid value → expect
ConfigExceptionand clear message.(Optional) Property-based test ensuring no accepted value violates the
max_fetch_wait << timeout / 2invariant under defaults.
Rejected Alternatives
Silent clamping to 1000 ms:
Rejected to avoid non-obvious behavior and hidden config drift. Validation with an explicit error is clearer and safer.
Derive timeout automatically (e.g.,
k * max_fetch_wait):Reduces operator control; we prefer a simple invariant and explicit validation.
Make max fetch wait configurable instead:
Out of scope here. Even if exposed, we would still need a minimum for the timeout to maintain a robust ratio.