diff --git a/docs-data/property-overrides.json b/docs-data/property-overrides.json index b9be30e9c..fc707e32b 100644 --- a/docs-data/property-overrides.json +++ b/docs-data/property-overrides.json @@ -670,7 +670,7 @@ "config_scope": "cluster" }, "delete.retention.ms": { - "description": "The retention time for tombstone records in a compacted topic. Redpanda removes tombstone records after the retention limit is exceeded.\n\nIf you have enabled Tiered Storage and set <> or <> for the topic, you cannot enable tombstone removal.\n\nIf both `delete.retention.ms` and the cluster property config_ref:tombstone_retention_ms,true,properties/cluster-properties[] are set, `delete.retention.ms` overrides the cluster level tombstone retention for an individual topic.", + "description": "The retention time for tombstone records in a compacted topic. Redpanda removes tombstone records after the retention limit is exceeded.\n\nIf you have enabled Tiered Storage and set <> or <> for the topic, you cannot enable tombstone removal.\n\nIf both `delete.retention.ms` and the cluster property config_ref:tombstone_retention_ms,true,properties/cluster-properties[] are set, `delete.retention.ms` overrides the cluster level tombstone retention for an individual topic.\n\nThis property supports three states:\n\n* Positive value: Sets the milliseconds to retain tombstone records before removal.\n* 0: Tombstone records are immediately eligible for removal.\n* Negative value: Disables tombstone removal entirely for this topic.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#tombstone_retention_ms[`tombstone_retention_ms`]", "xref:manage:cluster-maintenance/compaction-settings.adoc#tombstone-record-removal[Tombstone record removal]" @@ -955,7 +955,7 @@ "config_scope": "cluster" }, "initial.retention.local.target.bytes": { - "description": "A size-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.", + "description": "A size-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes of local data to transfer during cluster resize.\n* 0: No local data is transferred during cluster resize.\n* Negative value: All locally retained data is transferred (default behavior).", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#initial_retention_local_target_bytes[`initial_retention_local_target_bytes`]", "xref:manage:tiered-storage.adoc#fast-commission-and-decommission[Fast commission and decommission through Tiered Storage]" @@ -963,7 +963,7 @@ "config_scope": "topic" }, "initial.retention.local.target.ms": { - "description": "A time-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.", + "description": "A time-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum age (milliseconds) of local data to transfer during cluster resize.\n* 0: No local data is transferred during cluster resize.\n* Negative value: All locally retained data is transferred (default behavior).", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#initial_retention_local_target_ms[`initial_retention_local_target_ms`]", "xref:manage:tiered-storage.adoc#fast-commission-and-decommission[Fast commission and decommission through Tiered Storage]" @@ -1319,7 +1319,7 @@ "config_scope": "cluster" }, "min.cleanable.dirty.ratio": { - "description": "The minimum ratio between the number of bytes in dirty segments and the total number of bytes in closed segments that must be reached before a partition's log is eligible for compaction in a compact topic.", + "description": "The minimum ratio between dirty and total bytes in closed segments before a partition's log is eligible for compaction in a compact topic.\n\nThis property supports three states:\n\n* Positive value: Sets the minimum dirty ratio (0.0 to 1.0) required before compaction.\n* 0: Compaction is always eligible regardless of dirty ratio.\n* Negative value: This property is not considered when deciding if a log is eligible for compaction.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#min_cleanable_dirty_ratio[`min_cleanable_dirty_ratio`]" ], @@ -1688,7 +1688,7 @@ "config_scope": "topic" }, "retention.bytes": { - "description": "A size-based retention limit that configures the maximum size that a topic partition can grow before becoming eligible for cleanup.\n\nIf `retention.bytes` is set to a positive value, it overrides the cluster property xref:cluster-properties.adoc#retention_bytes[`retention_bytes`] for the topic, and the total retained size for the topic is `retention.bytes` multiplied by the number of partitions for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, cleanup occurs when either limit is reached.", + "description": "A size-based retention limit that configures the maximum size that a topic partition can grow before becoming eligible for cleanup.\n\nIf `retention.bytes` is set to a positive value, it overrides the cluster property xref:cluster-properties.adoc#retention_bytes[`retention_bytes`] for the topic, and the total retained size for the topic is `retention.bytes` multiplied by the number of partitions for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, cleanup occurs when either limit is reached.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes per partition. When exceeded, oldest data becomes eligible for cleanup.\n* 0: Partitions are immediately eligible for cleanup.\n* Negative value: Disables size-based retention for this topic.", "related_topics": [ "xref:cluster-properties.adoc#retention_bytes[`retention_bytes`]", "xref:reference:properties/cluster-properties.adoc#retention_bytes[`retention_bytes`]", @@ -1697,7 +1697,7 @@ "config_scope": "topic" }, "retention.local.target.bytes": { - "description": "A size-based retention limit for Tiered Storage that configures the maximum size that a topic partition in local storage can grow before becoming eligible for cleanup. It applies per partition and is equivalent to <> without Tiered Storage.", + "description": "A size-based retention limit for Tiered Storage that configures the maximum size that a topic partition in local storage can grow before becoming eligible for cleanup. It applies per partition and is equivalent to <> without Tiered Storage.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes per partition in local storage before cleanup.\n* 0: Data in local storage is immediately eligible for cleanup.\n* Negative value: Disables size-based local retention override for this topic.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#retention_local_target_bytes[`retention_local_target_bytes`]", "xref:manage:tiered-storage.adoc[Tiered Storage]" @@ -1705,7 +1705,7 @@ "config_scope": "topic" }, "retention.local.target.ms": { - "description": "A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before it's eligible for cleanup. This property is equivalent to <> without Tiered Storage.", + "description": "A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before cleanup. It applies per partition and is equivalent to <> without Tiered Storage.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds to retain data in local storage.\n* 0: Data in local storage is immediately eligible for cleanup.\n* Negative value: Disables time-based local retention override for this topic.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#retention_local_target_ms[`retention_local_target_ms`]", "xref:manage:tiered-storage.adoc[Tiered Storage]", @@ -1714,7 +1714,7 @@ "config_scope": "topic" }, "retention.ms": { - "description": "A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted. If a non-positive value, no per-topic limit is applied.\n\nIf `retention.ms` is set to a positive value, it overrides the cluster property xref:./cluster-properties.adoc#log_retention_ms[`log_retention_ms`] for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, the earliest occurring limit applies.", + "description": "A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted.\n\nIf `retention.ms` is set to a positive value, it overrides the cluster property xref:./cluster-properties.adoc#log_retention_ms[`log_retention_ms`] for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, the earliest occurring limit applies.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds to retain data. After this duration, segments become eligible for cleanup.\n* 0: Data is immediately eligible for cleanup.\n* Negative value: Disables time-based retention for this topic.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#log_retention_ms[`log_retention_ms`]", "xref:manage:cluster-maintenance/disk-utilization.adoc#configure-message-retention[Configure message retention]" @@ -1926,7 +1926,7 @@ "config_scope": "topic" }, "segment.ms": { - "description": "The maximum duration that a log segment of a topic is active (open for writes and not deletable). A periodic event, with `segment.ms` as its period, forcibly closes the active segment and transitions, or rolls, to a new active segment. The closed (inactive) segment is then eligible to be cleaned up according to cleanup and retention properties.\n\nIf set to a positive duration, `segment.ms` overrides the cluster property xref:./cluster-properties.adoc#log_segment_ms[`log_segment_ms`]. Values are automatically clamped between the cluster bounds set by xref:./cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`] (default: 10 minutes) and xref:./cluster-properties.adoc#log_segment_ms_max[`log_segment_ms_max`] (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with `rpk cluster config get log_segment_ms_min log_segment_ms_max`.", + "description": "The maximum duration that a log segment of a topic is active (open for writes and not deletable). A periodic event, with `segment.ms` as its period, forcibly closes the active segment and transitions, or rolls, to a new active segment. The closed (inactive) segment is then eligible to be cleaned up according to cleanup and retention properties.\n\nIf set to a positive duration, `segment.ms` overrides the cluster property xref:./cluster-properties.adoc#log_segment_ms[`log_segment_ms`]. Values are automatically clamped between the cluster bounds set by xref:./cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`] (default: 10 minutes) and xref:./cluster-properties.adoc#log_segment_ms_max[`log_segment_ms_max`] (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with `rpk cluster config get log_segment_ms_min log_segment_ms_max`.\n\nFor topics with compaction enabled, `max.compaction.lag.ms` also acts as a limit to `segment.ms`.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds a segment remains active before rolling to a new segment.\n* 0: Segments are immediately eligible for closure.\n* Negative value: Disables time-based segment rolling for this topic.", "related_topics": [ "xref:reference:properties/cluster-properties.adoc#log_segment_ms[`log_segment_ms`]", "xref:reference:properties/cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`]", diff --git a/modules/develop/pages/config-topics.adoc b/modules/develop/pages/config-topics.adoc index 68e05506c..a2e711703 100644 --- a/modules/develop/pages/config-topics.adoc +++ b/modules/develop/pages/config-topics.adoc @@ -98,6 +98,11 @@ The cleanup policy determines how to clean up the partition log files when they Unlike compacted topics, which keep only the most recent message for a given key, topics configured with a `delete` cleanup policy provide a running history of all changes for those topics. +[NOTE] +==== +include::shared:partial$tristate-behavior-change-25-3.adoc[] +==== + include::develop:partial$topic-properties-warning.adoc[] For example, to change a topic's policy to `compact`, run: diff --git a/modules/get-started/pages/release-notes/redpanda.adoc b/modules/get-started/pages/release-notes/redpanda.adoc index 2eef7c25c..2dc4ad7b5 100644 --- a/modules/get-started/pages/release-notes/redpanda.adoc +++ b/modules/get-started/pages/release-notes/redpanda.adoc @@ -144,6 +144,23 @@ The following configuration properties have new default values in v25.3: * xref:reference:properties/cluster-properties.adoc#partition_autobalancing_mode[`partition_autobalancing_mode`]: Changed from `node_add` to `continuous` (Enterprise license required). * xref:reference:properties/cluster-properties.adoc#iceberg_throttle_backlog_size_ratio[`iceberg_throttle_backlog_size_ratio`]: Changed from `0.3` to `null`. +[[behavior-changes]] +=== Behavior changes + +The following topic properties now support enhanced tristate behavior: + +* xref:reference:properties/topic-properties.adoc#segment-ms[`segment.ms`] +* xref:reference:properties/topic-properties.adoc#retention-bytes[`retention.bytes`] +* xref:reference:properties/topic-properties.adoc#retention-ms[`retention.ms`] +* xref:reference:properties/topic-properties.adoc#retention-local-target-bytes[`retention.local.target.bytes`] +* xref:reference:properties/topic-properties.adoc#retention-local-target-ms[`retention.local.target.ms`] +* xref:reference:properties/topic-properties.adoc#initial-retention-local-target-bytes[`initial.retention.local.target.bytes`] +* xref:reference:properties/topic-properties.adoc#initial-retention-local-target-ms[`initial.retention.local.target.ms`] +* xref:reference:properties/topic-properties.adoc#delete-retention-ms[`delete.retention.ms`] +* xref:reference:properties/topic-properties.adoc#min-cleanable-dirty-ratio[`min.cleanable.dirty.ratio`] + +Previously, these properties treated zero and negative values the same way. Now they support three distinct states: positive values set specific limits, zero provides immediate eligibility for cleanup/compaction, and negative values disable the feature entirely. Review your topic configurations if you currently use zero values for these properties. + === Deprecations The following configuration properties have been deprecated in v25.3 and will be removed in a future release: diff --git a/modules/reference/attachments/redpanda-properties-v25.3.4.json b/modules/reference/attachments/redpanda-properties-v25.3.4.json index cfea58e4e..80785ea92 100644 --- a/modules/reference/attachments/redpanda-properties-v25.3.4.json +++ b/modules/reference/attachments/redpanda-properties-v25.3.4.json @@ -5094,7 +5094,7 @@ "corresponding_cluster_property": "tombstone_retention_ms", "default": null, "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "The retention time for tombstone records in a compacted topic. Redpanda removes tombstone records after the retention limit is exceeded.\n\nIf you have enabled Tiered Storage and set <> or <> for the topic, you cannot enable tombstone removal.\n\nIf both `delete.retention.ms` and the cluster property config_ref:tombstone_retention_ms,true,properties/cluster-properties[] are set, `delete.retention.ms` overrides the cluster level tombstone retention for an individual topic.", + "description": "The retention time for tombstone records in a compacted topic. Redpanda removes tombstone records after the retention limit is exceeded.\n\nIf you have enabled Tiered Storage and set <> or <> for the topic, you cannot enable tombstone removal.\n\nIf both `delete.retention.ms` and the cluster property config_ref:tombstone_retention_ms,true,properties/cluster-properties[] are set, `delete.retention.ms` overrides the cluster level tombstone retention for an individual topic.\n\nThis property supports three states:\n\n* Positive value: Sets the milliseconds to retain tombstone records before removal.\n* 0: Tombstone records are immediately eligible for removal.\n* Negative value: Disables tombstone removal entirely for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -7063,7 +7063,7 @@ "corresponding_cluster_property": "initial_retention_local_target_bytes_default", "default": null, "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A size-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.", + "description": "A size-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes of local data to transfer during cluster resize.\n* 0: No local data is transferred during cluster resize.\n* Negative value: All locally retained data is transferred (default behavior).", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -7089,7 +7089,7 @@ "corresponding_cluster_property": "initial_retention_local_target_ms_default", "default": null, "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A time-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.", + "description": "A time-based initial retention limit for Tiered Storage that determines how much data in local storage is transferred to a partition replica when a cluster is resized. If `null` (default), all locally retained data is transferred.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum age (milliseconds) of local data to transfer during cluster resize.\n* 0: No local data is transferred during cluster resize.\n* Negative value: All locally retained data is transferred (default behavior).", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -9489,7 +9489,7 @@ "corresponding_cluster_property": "min_cleanable_dirty_ratio", "default": 0.2, "defined_in": "src/v/kafka/server/handlers/topics/types.h", - "description": "The minimum ratio between the number of bytes in dirty segments and the total number of bytes in closed segments that must be reached before a partition's log is eligible for compaction in a compact topic.", + "description": "The minimum ratio between dirty and total bytes in closed segments before a partition's log is eligible for compaction in a compact topic.\n\nThis property supports three states:\n\n* Positive value: Sets the minimum dirty ratio (0.0 to 1.0) required before compaction.\n* 0: Compaction is always eligible regardless of dirty ratio.\n* Negative value: This property is not considered when deciding if a log is eligible for compaction.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -11485,7 +11485,7 @@ "corresponding_cluster_property": "retention_bytes", "default": null, "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A size-based retention limit that configures the maximum size that a topic partition can grow before becoming eligible for cleanup.\n\nIf `retention.bytes` is set to a positive value, it overrides the cluster property xref:cluster-properties.adoc#retention_bytes[`retention_bytes`] for the topic, and the total retained size for the topic is `retention.bytes` multiplied by the number of partitions for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, cleanup occurs when either limit is reached.", + "description": "A size-based retention limit that configures the maximum size that a topic partition can grow before becoming eligible for cleanup.\n\nIf `retention.bytes` is set to a positive value, it overrides the cluster property xref:cluster-properties.adoc#retention_bytes[`retention_bytes`] for the topic, and the total retained size for the topic is `retention.bytes` multiplied by the number of partitions for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, cleanup occurs when either limit is reached.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes per partition. When exceeded, oldest data becomes eligible for cleanup.\n* 0: Partitions are immediately eligible for cleanup.\n* Negative value: Disables size-based retention for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -11512,7 +11512,7 @@ "corresponding_cluster_property": "retention_local_target_bytes_default", "default": null, "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A size-based retention limit for Tiered Storage that configures the maximum size that a topic partition in local storage can grow before becoming eligible for cleanup. It applies per partition and is equivalent to <> without Tiered Storage.", + "description": "A size-based retention limit for Tiered Storage that configures the maximum size that a topic partition in local storage can grow before becoming eligible for cleanup. It applies per partition and is equivalent to <> without Tiered Storage.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum bytes per partition in local storage before cleanup.\n* 0: Data in local storage is immediately eligible for cleanup.\n* Negative value: Disables size-based local retention override for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -11539,7 +11539,7 @@ "default": 86400000, "default_human_readable": "1 day", "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before it's eligible for cleanup. This property is equivalent to <> without Tiered Storage.", + "description": "A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before cleanup. It applies per partition and is equivalent to <> without Tiered Storage.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds to retain data in local storage.\n* 0: Data in local storage is immediately eligible for cleanup.\n* Negative value: Disables time-based local retention override for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -11567,7 +11567,7 @@ "default": 604800000, "default_human_readable": "1 week", "defined_in": "src/v/kafka/protocol/topic_properties.h", - "description": "A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted. If a non-positive value, no per-topic limit is applied.\n\nIf `retention.ms` is set to a positive value, it overrides the cluster property xref:./cluster-properties.adoc#log_retention_ms[`log_retention_ms`] for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, the earliest occurring limit applies.", + "description": "A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted.\n\nIf `retention.ms` is set to a positive value, it overrides the cluster property xref:./cluster-properties.adoc#log_retention_ms[`log_retention_ms`] for the topic.\n\nWhen both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, the earliest occurring limit applies.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds to retain data. After this duration, segments become eligible for cleanup.\n* 0: Data is immediately eligible for cleanup.\n* Negative value: Disables time-based retention for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, @@ -12564,7 +12564,7 @@ "corresponding_cluster_property": "log_segment_ms", "default": "2 weeks", "defined_in": "src/v/kafka/server/handlers/topics/types.h", - "description": "The maximum duration that a log segment of a topic is active (open for writes and not deletable). A periodic event, with `segment.ms` as its period, forcibly closes the active segment and transitions, or rolls, to a new active segment. The closed (inactive) segment is then eligible to be cleaned up according to cleanup and retention properties.\n\nIf set to a positive duration, `segment.ms` overrides the cluster property xref:./cluster-properties.adoc#log_segment_ms[`log_segment_ms`]. Values are automatically clamped between the cluster bounds set by xref:./cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`] (default: 10 minutes) and xref:./cluster-properties.adoc#log_segment_ms_max[`log_segment_ms_max`] (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with `rpk cluster config get log_segment_ms_min log_segment_ms_max`.", + "description": "The maximum duration that a log segment of a topic is active (open for writes and not deletable). A periodic event, with `segment.ms` as its period, forcibly closes the active segment and transitions, or rolls, to a new active segment. The closed (inactive) segment is then eligible to be cleaned up according to cleanup and retention properties.\n\nIf set to a positive duration, `segment.ms` overrides the cluster property xref:./cluster-properties.adoc#log_segment_ms[`log_segment_ms`]. Values are automatically clamped between the cluster bounds set by xref:./cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`] (default: 10 minutes) and xref:./cluster-properties.adoc#log_segment_ms_max[`log_segment_ms_max`] (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with `rpk cluster config get log_segment_ms_min log_segment_ms_max`.\n\nFor topics with compaction enabled, `max.compaction.lag.ms` also acts as a limit to `segment.ms`.\n\nThis property supports three states:\n\n* Positive value: Sets the maximum milliseconds a segment remains active before rolling to a new segment.\n* 0: Segments are immediately eligible for closure.\n* Negative value: Disables time-based segment rolling for this topic.", "is_deprecated": false, "is_enterprise": false, "is_topic_property": true, diff --git a/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc b/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc index dd953a9b3..f2d2668d4 100644 --- a/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc +++ b/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc @@ -53,6 +53,11 @@ NOTE: For the full list of properties, see xref:reference:topic-properties.adoc[ endif::[] +[IMPORTANT] +==== +include::shared:partial$tristate-behavior-change-25-3.adoc[] +==== + == Examples === Create a topic diff --git a/modules/reference/partials/properties/topic-properties.adoc b/modules/reference/partials/properties/topic-properties.adoc index 9a90ffe40..1463d30bf 100644 --- a/modules/reference/partials/properties/topic-properties.adoc +++ b/modules/reference/partials/properties/topic-properties.adoc @@ -321,6 +321,12 @@ If you have enabled Tiered Storage and set <> without Tiered Storage. +This property supports three states: + +* Positive value: Sets the maximum bytes per partition in local storage before cleanup. +* 0: Data in local storage is immediately eligible for cleanup. +* Negative value: Disables size-based local retention override for this topic. + [cols="1s,2a"] |=== | Property | Value @@ -1799,7 +1835,13 @@ endif::[] // tag::category-tiered-storage[] === retention.local.target.ms -A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before it's eligible for cleanup. This property is equivalent to <> without Tiered Storage. +A time-based retention limit for Tiered Storage that sets the maximum duration that a log's segment file for a topic is retained in local storage before cleanup. It applies per partition and is equivalent to <> without Tiered Storage. + +This property supports three states: + +* Positive value: Sets the maximum milliseconds to retain data in local storage. +* 0: Data in local storage is immediately eligible for cleanup. +* Negative value: Disables time-based local retention override for this topic. [cols="1s,2a"] |=== @@ -1848,12 +1890,18 @@ endif::[] // tag::category-retention-compaction[] === retention.ms -A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted. If a non-positive value, no per-topic limit is applied. +A time-based retention limit that configures the maximum duration that a log's segment file for a topic is retained before it becomes eligible to be cleaned up. To consume all data, a consumer of the topic must read from a segment before its `retention.ms` elapses, otherwise the segment may be compacted and/or deleted. If `retention.ms` is set to a positive value, it overrides the cluster property xref:./cluster-properties.adoc#log_retention_ms[`log_retention_ms`] for the topic. When both size-based (`retention.bytes`) and time-based (`retention.ms`) retention limits are set, the earliest occurring limit applies. +This property supports three states: + +* Positive value: Sets the maximum milliseconds to retain data. After this duration, segments become eligible for cleanup. +* 0: Data is immediately eligible for cleanup. +* Negative value: Disables time-based retention for this topic. + [cols="1s,2a"] |=== | Property | Value @@ -1958,6 +2006,14 @@ The maximum duration that a log segment of a topic is active (open for writes an If set to a positive duration, `segment.ms` overrides the cluster property xref:./cluster-properties.adoc#log_segment_ms[`log_segment_ms`]. Values are automatically clamped between the cluster bounds set by xref:./cluster-properties.adoc#log_segment_ms_min[`log_segment_ms_min`] (default: 10 minutes) and xref:./cluster-properties.adoc#log_segment_ms_max[`log_segment_ms_max`] (default: 1 year). If your configured value exceeds these bounds, Redpanda uses the bound value and logs a warning. Check current cluster bounds with `rpk cluster config get log_segment_ms_min log_segment_ms_max`. +For topics with compaction enabled, `max.compaction.lag.ms` also acts as a limit to `segment.ms`. + +This property supports three states: + +* Positive value: Sets the maximum milliseconds a segment remains active before rolling to a new segment. +* 0: Segments are immediately eligible for closure. +* Negative value: Disables time-based segment rolling for this topic. + [cols="1s,2a"] |=== | Property | Value diff --git a/modules/shared/partials/tristate-behavior-change-25-3.adoc b/modules/shared/partials/tristate-behavior-change-25-3.adoc new file mode 100644 index 000000000..8e7fa2460 --- /dev/null +++ b/modules/shared/partials/tristate-behavior-change-25-3.adoc @@ -0,0 +1 @@ +Starting in Redpanda v25.3, several topic properties support enhanced tristate behavior. Properties like `retention.ms`, `retention.bytes`, `segment.ms`, and others now distinguish between zero values (immediate eligibility for cleanup/compaction) and negative values (disable the feature entirely). Previously, zero and negative values were treated the same way. For the complete list of affected properties and detailed information, see xref:25.3@get-started:release-notes/redpanda.adoc#behavior-changes[Redpanda v25.3 behavior changes]. Review your topic configurations if you currently use zero values for these properties. \ No newline at end of file diff --git a/modules/upgrade/partials/incompat-changes.adoc b/modules/upgrade/partials/incompat-changes.adoc index 2ecca5d9a..9610dfe84 100644 --- a/modules/upgrade/partials/incompat-changes.adoc +++ b/modules/upgrade/partials/incompat-changes.adoc @@ -8,6 +8,12 @@ include::upgrade:partial$iceberg-breaking-changes.adoc[] -- ** Schema Registry no longer allows specifying a schema ID and version when registering a schema in read-write mode. You must use import mode to register a schema with a specific ID and version. See xref:manage:schema-reg/schema-reg-api.adoc#set-schema-registry-mode[Use the Schema Registry API] for more information. +** {empty} ++ +-- +include::shared:partial$tristate-behavior-change-25-3.adoc[] +-- + * {empty} + --