This message was deleted.
# general
s
This message was deleted.
j
Hi Sai ... something like this?
s
John’s example should do it. But if you want 30 days beyond the 10 the second rule would need to be P40D.
s
does it also delete the data from deep storage after 30 days with drop forever rule? or should we configure dropByperiod ?
s
In order to delete data and metadata after segments have been dropped, a kill task is needed. You can setup automatic kill tasks with:
Copy code
druid.coordinator.kill.on=true               # default is false
druid.coordinator.kill.durationToRetain=P90D # default is 90 days of segments left in deep storage even if they have been dropped
a
After 30 days, the first rule that is matched would be the dropForeverRule, this will cause the segments to be dropped, another dropByPeriod rule would not be needed.
j
Just to clear on the distinction -- • Load/Drop rules for retention purposes do not physically delete anything ... they just mark segments as used/unused so queries (including Deep Storage queries) will or will not use them. ◦ Fyi Deep storage (cold tier) segments are still marked as used, they just have 0 replicas loaded on Historicals so the regular query engine won't see them. • Kill tasks physically delete segments, both the segment files in deep storage and their corresponding druid_segments records. Kill tasks will only delete segments that have been marked as unused.