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

replication: prevent gc from deleting xlogs that haven't been fetched

Currently, nothing prevents the garbage collector from deleting xlogs
that haven't been fetched by a replica yet. To fix that, let's keep
track of the oldest checkpoint needed by each replica. The replica
checkpoint is first set on initial join - at that time it points to the
snapshot the replica was bootstrapped from. After that it gets updated
on xlog relay, by tx_status_update(). Since the latter may invoke
garbage collection now (by unreferencing the previous checkpoint) and
gc_run() may yield on coeio_unlink(), we have to use "tx" pipe instead
of "tx_prio" for communication between relay and tx cords.

Closes #748
parent 067a31b4
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