Skip to content

Commit 73afcc9

Browse files
authored
KAFKA-13610: Deprecate log.cleaner.enable configuration (#19472)
JIRA: KAFKA-13610 This patch deprecates the `log.cleaner.enable` configuration. It's part of [KIP-1148](https://cwiki.apache.org/confluence/x/XAyWF). Reviewers: Chia-Ping Tsai <[email protected]>, PoAn Yang <[email protected]>, Ken Huang <[email protected]>, Jhen-Yung Hsu <[email protected]>
1 parent fb2ce76 commit 73afcc9

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Diff for: core/src/main/scala/kafka/server/KafkaConfig.scala

-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ class KafkaConfig private(doLog: Boolean, val props: util.Map[_, _])
341341
def logCleanerMaxCompactionLagMs = getLong(CleanerConfig.LOG_CLEANER_MAX_COMPACTION_LAG_MS_PROP)
342342
def logCleanerBackoffMs = getLong(CleanerConfig.LOG_CLEANER_BACKOFF_MS_PROP)
343343
def logCleanerMinCleanRatio = getDouble(CleanerConfig.LOG_CLEANER_MIN_CLEAN_RATIO_PROP)
344-
val logCleanerEnable = getBoolean(CleanerConfig.LOG_CLEANER_ENABLE_PROP)
345344
def logIndexSizeMaxBytes = getInt(ServerLogConfigs.LOG_INDEX_SIZE_MAX_BYTES_CONFIG)
346345
def logIndexIntervalBytes = getInt(ServerLogConfigs.LOG_INDEX_INTERVAL_BYTES_CONFIG)
347346
def logDeleteDelayMs = getLong(ServerLogConfigs.LOG_DELETE_DELAY_MS_CONFIG)

Diff for: docs/upgrade.html

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ <h6><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable changes in 4
3232
</li>
3333
</ul>
3434
</li>
35+
<li><b>Broker</b>
36+
<ul>
37+
<li>
38+
The configuration <code>log.cleaner.enable</code> is deprecated. Users should no longer set it to <code>false</code> to prepare for future removal.
39+
For further details, please refer to <a href="https://cwiki.apache.org/confluence/x/XAyWF">KIP-1148</a>.
40+
</li>
41+
</ul>
42+
</li>
3543
<li><b>Producer</b>
3644
<ul>
3745
<li>The <code>flush</code> method now detects potential deadlocks and prohibits its use inside a callback. This change prevents unintended blocking behavior, which was a known risk in earlier versions.

Diff for: storage/src/main/java/org/apache/kafka/storage/internals/log/CleanerConfig.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class CleanerConfig {
5050
public static final String LOG_CLEANER_DEDUPE_BUFFER_LOAD_FACTOR_PROP = ServerTopicConfigSynonyms.LOG_CLEANER_PREFIX + "io.buffer.load.factor";
5151
public static final String LOG_CLEANER_BACKOFF_MS_PROP = ServerTopicConfigSynonyms.LOG_CLEANER_PREFIX + "backoff.ms";
5252
public static final String LOG_CLEANER_MIN_CLEAN_RATIO_PROP = ServerTopicConfigSynonyms.serverSynonym(TopicConfig.MIN_CLEANABLE_DIRTY_RATIO_CONFIG);
53+
@Deprecated(since = "4.1", forRemoval = true)
5354
public static final String LOG_CLEANER_ENABLE_PROP = ServerTopicConfigSynonyms.LOG_CLEANER_PREFIX + "enable";
5455
public static final String LOG_CLEANER_DELETE_RETENTION_MS_PROP = ServerTopicConfigSynonyms.serverSynonym(TopicConfig.DELETE_RETENTION_MS_CONFIG);
5556
public static final String LOG_CLEANER_MIN_COMPACTION_LAG_MS_PROP = ServerTopicConfigSynonyms.serverSynonym(TopicConfig.MIN_COMPACTION_LAG_MS_CONFIG);
@@ -68,7 +69,9 @@ public class CleanerConfig {
6869
public static final String LOG_CLEANER_DEDUPE_BUFFER_LOAD_FACTOR_DOC = "Log cleaner dedupe buffer load factor. The percentage full the dedupe buffer can become. A higher value " +
6970
"will allow more log to be cleaned at once but will lead to more hash collisions";
7071
public static final String LOG_CLEANER_BACKOFF_MS_DOC = "The amount of time to sleep when there are no logs to clean";
71-
public static final String LOG_CLEANER_ENABLE_DOC = "Enable the log cleaner process to run on the server. Should be enabled if using any topics with a cleanup.policy=compact including the internal offsets topic. If disabled those topics will not be compacted and continually grow in size.";
72+
@Deprecated(since = "4.1", forRemoval = true)
73+
public static final String LOG_CLEANER_ENABLE_DOC = "This configuration has been deprecated and will be removed in Kafka 5.0. Users should not set it to false to prepare for its future removal. " +
74+
"Enable the log cleaner process to run on the server. Should be enabled if using any topics with a cleanup.policy=compact including the internal offsets topic. If disabled those topics will not be compacted and continually grow in size.";
7275
public static final String LOG_CLEANER_DELETE_RETENTION_MS_DOC = "The amount of time to retain tombstone message markers for log compacted topics. This setting also gives a bound " +
7376
"on the time in which a consumer must complete a read if they begin from offset 0 to ensure that they get a valid snapshot of the final stage (otherwise " +
7477
"tombstones messages may be collected before a consumer completes their scan).";

0 commit comments

Comments
 (0)