Skip to content
Snippets Groups Projects
Commit 666c0337 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Roman Tsisyk
Browse files

Consolidate garbage collection

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.
parent 6c5329af
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment