Skip to content

Commit

Permalink
rpk steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kbatuigas committed Oct 25, 2024
1 parent 8a63914 commit bf75351
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions modules/manage/pages/cluster-maintenance/compaction-settings.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <topic-name> --delete delete.retention.ms
----

To override the cluster-wide default for a specific topic:

[,bash]
----
rpk topic alter-config <topic-name> --set delete.retention.ms=5
----

To disable tombstone retention for a specific topic:

[,bash]
----
rpk topic alter-config <topic-name> --set delete.retention.ms=-1
----

== Compaction policy settings

Expand Down

0 comments on commit bf75351

Please sign in to comment.