Compactor is not working

My config Loki:
Loki v.3.4.2
Grafana v.11..
#################

schema_config:
  configs:
    - from: 2020-10-24
      store: boltdb-shipper                     
      object_store: filesystem                  
      schema: v13                               
      index:
        prefix: index_loki_blob
        period: 24h                            

storage_config:
  boltdb_shipper:
    active_index_directory: /data/loki/boltdb-shipper-active
    cache_location: /data/loki/boltdb-cache
    cache_ttl: 24h                             
  filesystem:
    directory: /data/loki/chunks

compactor:
  compaction_interval: 1h               
  delete_request_cancel_period: 12h             
  delete_request_store: filesystem            
  retention_delete_delay: 2h                 
  retention_delete_worker_count: 10           
  retention_enabled: true                       
  working_directory: /data/loki/compactor      

limits_config:
  allow_structured_metadata: false
  ingestion_burst_size_mb: 200                 
  ingestion_rate_mb: 20                         
  ingestion_rate_strategy: local
  max_chunks_per_query: 200000                 
  max_entries_limit_per_query: 1000           
  max_global_streams_per_user: 524288000      
  max_query_lookback: 14d                     
  max_query_parallelism: 8                    
  max_query_series: 100000                     
  max_streams_per_user: 100000                
  per_stream_rate_limit: "512MB"            
  per_stream_rate_limit_burst: "1024MB"      
  reject_old_samples: true                     
  reject_old_samples_max_age: 336h      
  retention_period: 336h                        
  split_queries_by_interval: 15m  

querier:
  engine:                                   
    max_look_back_period: 336h               
  max_concurrent: 20                         
  query_ingesters_within: 2h 

table_manager:
  retention_deletes_enabled: true               
  retention_period: 336h       

compactor does not work, after 14 days, the old data is not deleted and the disk fills up until it runs out. What to do? What should I do?

Try disabling table_manager. If that still doesn’t work, see if you can find any error log from compactor.

The table_manager retention settings do not apply when you’re using boltdb-shipper.
boltdb-shipper retention relies only on the compactor, not table_manager.
You can try

schema_config:
  configs:
    - from: 2020-10-24
      store: boltdb-shipper
      object_store: filesystem
      schema: v13
      index:
        prefix: index_loki_blob
        period: 24h
      **retention_period: 336h**  # <- You should move/add this here

The retention_period under limits_config is global, but schema_config.configs.retention_period is what the compactor uses.

Try check the log for loki, and look for something like
"“retention applied to table index_20240610, marked for deletion”.

when adding retention_period: 336h to schema_configure, I have an error:
failed parsing config: /etc/loki/loki-local-config.yaml: yaml: unmarshal errors:
line 55: field retention_period not found in type struct { PathPrefix string “yaml:“path_prefix””; Prefix string “yaml:“prefix””; Period model.Duration “yaml:“period””; Tags config.Tags “yaml:“tags”” }. Use -config.expand-env=true flag if you want to expand environment variables in your config file