This is an automated email from the ASF dual-hosted git repository.
mimaison 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 ac031bb4e2c KAFKA-4320: Clarify log compaction configuration docs
(#22304)
ac031bb4e2c is described below
commit ac031bb4e2c95ce00a90c8be6ca3f7c087fe5fbe
Author: Derek Ko <[email protected]>
AuthorDate: Wed May 20 02:49:56 2026 -0700
KAFKA-4320: Clarify log compaction configuration docs (#22304)
Clarifies the log compaction docs by distinguishing between the log
cleaner being enabled and compaction being applied only to topics whose
cleanup policy includes `compact`. It also calls out the topic-level
`cleanup.policy=compact` override separately from the broker-level
`log.cleanup.policy=compact` default.
Reviewers: Mickael Maison <[email protected]>, Sushant Mahajan
<[email protected]>
---
docs/design/design.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/design/design.md b/docs/design/design.md
index e5eb3808263..2fb13d23e34 100644
--- a/docs/design/design.md
+++ b/docs/design/design.md
@@ -436,13 +436,13 @@ Log compaction is handled by the log cleaner, a pool of
background threads that
### Configuring The Log Cleaner
-The log cleaner is enabled by default. This will start the pool of cleaner
threads. To enable log cleaning on a particular topic, add the log-specific
property
+The log cleaner is enabled by default, which starts the pool of cleaner
threads. Compaction runs only for topics whose cleanup policy includes
`compact`. To make compaction the broker default for topics that do not set
their own cleanup policy, add the following broker configuration to
`server.properties`:
```properties
log.cleanup.policy=compact
```
-The `log.cleanup.policy` property is a broker configuration setting defined in
the broker's `server.properties` file; it affects all of the topics in the
cluster that do not have a configuration override in place as documented
[here](/documentation.html#brokerconfigs). The log cleaner can be configured to
retain a minimum amount of the uncompacted "head" of the log. This is enabled
by setting the compaction time lag.
+To enable compaction for an individual topic, set the topic configuration
`cleanup.policy=compact` when creating or altering the topic. Topic-level
configuration overrides the broker default, as documented
[here](/documentation.html#topicconfigs). The log cleaner can be configured to
retain a minimum amount of the uncompacted "head" of the log. This is enabled
by setting the compaction time lag.
```properties
log.cleaner.min.compaction.lag.ms