From bf75351e50e025539f540b3c29922378e33dd303 Mon Sep 17 00:00:00 2001 From: kbatuigas <36839689+kbatuigas@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:31:00 -0400 Subject: [PATCH] rpk steps --- .../compaction-settings.adoc | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/compaction-settings.adoc b/modules/manage/pages/cluster-maintenance/compaction-settings.adoc index e9477fb20..c23a04683 100644 --- a/modules/manage/pages/cluster-maintenance/compaction-settings.adoc +++ b/modules/manage/pages/cluster-maintenance/compaction-settings.adoc @@ -28,10 +28,42 @@ Compaction policy may be applied to a cluster or to an individual topic. If both == Tombstone marker removal -When all messages for a given key are deleted, the topic partition keeps one message, called a tombstone, that contains the key, and a null value. A tombstone indicates to clients that the messages have been deleted. How long Redpanda keeps these tombstones depends on the topic cleanup policy: +When all messages for a given key are deleted, the topic partition keeps one message, called a tombstone, that contains the key, and a null value. A tombstone indicates to clients that the messages have been deleted. You can specify how long Redpanda keeps these tombstones using both a cluster configuration property `tombstone_retention_ms` and a topic configuration property `delete.retention.ms`. If both are set, the topic-level tombstone retention policy overrides the cluster-level policy. -* For topics with a `compact,delete` policy, Redpanda deletes the tombstones when a topic reaches its retention limits. -* For topics with a `compact` policy, Redpanda deletes the tombstones based on the specified tombstone retention policy. This retention policy is set with the `delete.retention.ms` topic configuration property. +[NOTE] +==== +You cannot enable `tombstone_retention_ms` if you have enabled any of the Tiered Storage cluster properties `cloud_storage_enabled`, `cloud_storage_enable_remote_read`, and `cloud_storage_enable_remote_write`. + +On the topic level, you cannot enable `delete.retention.ms` at the same time as the Tiered Storage topic configuration properties `redpanda.remote.read` and `redpanda.remote.write`. +==== + +To set the cluster-level tombstone retention policy, run the command: + +[,bash] +---- +rpk cluster config set tombstone_retention_ms=100 +---- + +You can set the tombstone retention for a topic so that it inherits the cluster-wide default: + +[,bash] +---- +rpk topic alter-config --delete delete.retention.ms +---- + +To override the cluster-wide default for a specific topic: + +[,bash] +---- +rpk topic alter-config --set delete.retention.ms=5 +---- + +To disable tombstone retention for a specific topic: + +[,bash] +---- +rpk topic alter-config --set delete.retention.ms=-1 +---- == Compaction policy settings