Hi,
Our Loki is currently saving its logs to object storage (an oci bucket to be precise).
We have set Loki’s retention to infinite and let a lifecycle policy of the object storage be in charge of deleting the logs older than a retention window. The reason for this is because Loki was saturating our bucket requests.
The side effect of this configuration is that the Index, also in object storage, keeps growing and its older metadata is not being cleaned up.
My question is, for both BoltDB shipper and TSDB Index implementations, can we safely enable the lifecycle policy so it can delete the Index folders that are older than our Lifecycle Policy retention period or will that cause problems to Loki?
From my understanding each Index folder, besides the newest not yet compacted ones, represents the log metadata for a specific day (under default settings), so if for example the retention is 10 days, it’s safe to delete all the Index folders older than 10 days.
Is that correct or is the only way to clean the Index to temporarily enable Loki’s retention again?