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
Loading
Please register or sign in to comment