Compactor does not delete old entries

I’ve loki installed with helm in k8s in a microservice mode. I’ve tried to configure compactor to delete old entries but it doesn’t work at all, they are not getting deleted.

The following snippet is the values yaml is there anything else to set up to make it work? (It does not delete anything)

loki:
common:
logLevel: debug
schemaConfig:
configs:
- from: 2024-04-01
store: tsdb
object_store: azure
schema: v13
index:
prefix: loki_index_
period: 24h
limits_config:
max_streams_per_user: 2500000
max_global_streams_per_user: 2500000
max_query_series: 100000
max_query_parallelism: 2
max_label_value_length: 4096
per_stream_rate_limit: 20MB
deletion_mode: filter-and-delete
retention_period: 8760h
retention_stream:
# Regla 1: Logs que NO tienen el label ‘audit’
- selector: ‘{audit!~“.*”}’ # Selecciona todos los logs que no tienen el label ‘audit’
priority: 1 # Alta prioridad para asegurarse de que se aplique esta política
period: 1000h

compactor:
working_directory: /var/loki/compactor/work
compaction_interval: 1m # Intervalo de compactación
retention_delete_worker_count: 150
retention_enabled: true
retention_delete_delay: 10m
delete_request_store: azure

max_ingestion_burst_size: 30

ingester:
chunk_encoding: snappy
tracing:
enabled: true
querier:
max_concurrent: 6

storage:
type: azure
azure:
accountName: fklokistorage
accountKey: …
connectionString: …
useManagedIdentity: false
useFederatedToken: false
endpointSuffix: blob.core.windows.net
bucketNames:
chunks: “chunks”
ruler: “ruler”
admin: “admin”

Try setting your retention period to multiple of 24. Also check compactor and see if there is any obvious error message.