From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 5 Oct 2018 01:27:04 +0300 From: Konstantin Osipov Subject: Re: [PATCH 13/13] replication: ref checkpoint needed to join replica Message-ID: <20181004222704.GM22855@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [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 > complete. > > 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