I have a single node druid instance up and running with metadata storage configured as mysql in our production environment. Every day a compaction task is run based on day granularity.
Running a compaction task automatically marks old segments as unused in metadata storage.
My question is, how can I delete those unused segments from metadata ? Should I run a kill task for a given interval ?
If yes, would it also also delete the used segments because there are both used and unused segments for that particular interval ??
If no, can I directly update the druid database in metadata by deleting the unused segments ?
mysql [druid]> delete from druid_segments where datasource = ‘some_datasource’ AND start like ‘2020-02%’ AND used = 0;
Please enlighten me with your sheer knowledge and experiences.