Is it safe to delete old .sst files, if data in those files is not needed anymore?

333 views
Skip to first unread message

Mihail Vasiliev

unread,
May 14, 2018, 10:01:12 AM5/14/18
to MyRocks - RocksDB storage engine for MySQL
Hello. 

I'm running MyRocks as backend for zabbix monitoring. It generally runs fine, but I've run into the following trouble - it seems to me that zabbix's internal garbage collector, which is doing something like "DELETE FROM some_table WHERE id=some_id and some_timestamp < now() - interval some_shift", is not effective in removing of old (and unneeded) data.

So, the point is - if I know for sure that some_shift is always less than, say, 6 month, is it safe to delete all .sst files older than 6 month? 
Does MyRocks stores list of those file names somewhere internally and relies on their contents somehow?
If so, is there an effective way to purge all ancient data from the table and free some disk space in the same time?

I know that I can try to add ttl to rows by carefully-crafted comment, but it seems to require adding column, which will take a lot of time on ~200Gb database and consume last bits of free space too. 
Reply all
Reply to author
Forward
0 new messages