Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
Currently, old snapshots and xlogs are deleted by the snapshot daemon
while vinyl files are removed from engine_commit_checkpoint().
For the sake of backups and replication, which need to temporarily
disable garbage collection, we should bring all garbage collection
routines together in one place. That's why this patch introduces
box.internal.gc() method, which takes an LSN of the latest snapshot to
keep as its argument. When called, it deletes all xlog files as well as
engine specific files (memtx snapshots, vinyl runs) that are not
required to recover from a snapshot with LSN greater or equal to the
given one. For removal of engine specific files, a new engine callback
is introduced, Engine::collectGarbage. The snapshot daemon now calls
box.internal.gc() to cleanup instead of deleting snap and xlog files by
itself.
666c0337
History
Name Last commit Last update