Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Discussion thread: here

JIRA:  KAFKA-13040 KAFKA-7760

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Public Interfaces

This KIP proposes to add these two broker configuration:

  • min.topic.segment.ms
  • min.topic.segment.bytes

This KIP proposes changes to the validation of affects the following topic configuration:

...

This KIP proposes to add the following minimum values to these topic dynamic broker configuration:

ConfigurationTypeDefault Current minimum valueProposed minimum valueDocumentation
min.topic.segment.ms0long3600000The minimum value for topic configuration segment.ms.
min.topic.segment.bytes0int1048576The

...

minimum value for topic configuration segment.bytes.


When provided via CreateTopics or AlterConfigs API, the validation of the following topic configuration changes as follow:

Topic configurationValidation
segment.msIf the value of segment.ms is less than the value of min.topic.segment.ms, Kafka broker will reject it by responding with InvalidConfigurationException
segment.bytesIf the value of segment.bytes is less than the value of min.topic.segment.bytes,

...

Kafka broker will reject it by

...

responding with InvalidConfigurationException


Compatibility, Deprecation, and Migration Plan

Kafka brokers that have existing topics with segment.ms less than min.topic.segment.ms and/or segment.bytes smaller than the proposed minimum less than min.topic.segment.bytes would have a warning message in the log.


Rejected Alternatives

  • Add new broker configuration to specify the allowed Set a fixed minimum value for segment.ms and segment.bytes – This will add another 2 configuration that will not be used much. And most people want Kafka to provide a safe default anyway.bytes. The reason this approach is rejected is because there are use cases that requires setting segment.ms or segment bytes to very small value. For example: deleting all records in a topic by setting segment.bytes to 0 temporarily.