Skip to content

Commit 60dfd47

Browse files
kbatuigasDeflaimun
authored andcommitted
rpk steps
1 parent 6b6afd5 commit 60dfd47

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

modules/manage/pages/cluster-maintenance/compaction-settings.adoc

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,42 @@ Compaction policy may be applied to a cluster or to an individual topic. If both
2828

2929
== Tombstone marker removal
3030

31-
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:
31+
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.
3232

33-
* For topics with a `compact,delete` policy, Redpanda deletes the tombstones when a topic reaches its retention limits.
34-
* 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.
33+
[NOTE]
34+
====
35+
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`.
36+
37+
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`.
38+
====
39+
40+
To set the cluster-level tombstone retention policy, run the command:
41+
42+
[,bash]
43+
----
44+
rpk cluster config set tombstone_retention_ms=100
45+
----
46+
47+
You can set the tombstone retention for a topic so that it inherits the cluster-wide default:
48+
49+
[,bash]
50+
----
51+
rpk topic alter-config <topic-name> --delete delete.retention.ms
52+
----
53+
54+
To override the cluster-wide default for a specific topic:
55+
56+
[,bash]
57+
----
58+
rpk topic alter-config <topic-name> --set delete.retention.ms=5
59+
----
60+
61+
To disable tombstone retention for a specific topic:
62+
63+
[,bash]
64+
----
65+
rpk topic alter-config <topic-name> --set delete.retention.ms=-1
66+
----
3567

3668
== Compaction policy settings
3769

0 commit comments

Comments
 (0)