Clearing data between CI runs

Hi Loki’s

Is there a method to delete all data between CI runs? I see /flush is mentioned as useful for CI.

I thought perhaps I could use /flush and then delete /loki/chunks but i’m seeing rpc error: code = Unknown desc = object not found in storage errors.

Hrm, not sure if there is a good way to do this without restarting the Loki process. The index files will be opened (memory mapped) and there isn’t any way to restart to a clean state unless you stop Loki and delete the /loki/chunks and /loki/index directories.