Hi,
based on this comment nad information that only boltdb-shipper supports deleting logs i understand it as follows:
TSDB:
- Indexes are deleted by compactor
- Chunks needs to be deleted by TTL policy on S3
- retention_stream: only deletes indexes but not chunks
boltdb-shipper:
- Indexes are deleted by compactor
- Chunks are deleted by Loki
- retention_stream: deletes both indexes and chunks
Am i Correct?
PS: Reason why i ask is that i cant get retention policy working. Here is my (simplified for forum) configuration:
limits_config:
retention_period: 720h
retention_stream:
- selector: '{app="myapp"}'
priority: 1
period: 24h
schema_config:
configs:
- from: "2023-01-01"
index:
period: 24h
prefix: loki_index_
object_store: s3
schema: v12
store: tsdb
compactor:
working_directory: /srv/loki/boltdb-shipper-compactor
shared_store: s3
retention_enabled: true
delete_request_cancel_period: 1h
retention_delete_delay: 1h
storage_config:
tsdb_shipper:
active_index_directory: /srv/loki/tsdb-index
cache_location: /srv/loki/tsdb-index-cache
shared_store: s3