[PATCH 13/13] replication: ref checkpoint needed to join replica
kostja at tarantool.org
Fri Oct 5 01:27:04 MSK 2018
* Vladimir Davydov <vdavydov.dev at gmail.com> [18/10/05 00:12]:
> Before joining a new replica we register a gc_consumer to prevent
> garbage collection of files needed for join and following subscribe.
> Before commit 9c5d851d7830 ("replication: remove old snapshot files not
> needed by replicas") a consumer would pin both checkpoints and WALs so
> that would work as expected. However, the above mentioned commit
> introduced consumer types and marked a consumer registered on replica
> join as WAL-only so if the garbage collector was invoked during join, it
> could delete files corresponding to the relayed checkpoint resulting in
> replica join failure. Fix this issue by pinning the checkpoint used for
> joining a replica with gc_ref_checkpoint and unpinning once join is
> The issue can only be reproduced if there are vinyl spaces, because
> deletion of an open snap file doesn't prevent the relay from reading it.
> The existing replication/gc test would catch the issue if it triggered
> compaction on the master so we simply tweak it accordingly instead of
> adding a new test case.
OK to push.
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches