From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 13 Mar 2019 16:38:39 +0300 From: Vladimir Davydov Subject: Re: [PATCH] replication: update replica gc state on subscribe Message-ID: <20190313133838.hz56rt4o7yqctsjt@esperanza> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: tarantool-patches@freelists.org Cc: "Alexander V. Tikhonov" List-ID: On Wed, Mar 13, 2019 at 04:13:45PM +0300, Vladimir Davydov wrote: > We advance replica->gc state only when an xlog file is fully recovered, > see recovery_close_log and relay_on_close_log_f. It may turn out that an > xlog file is fully recovered, but isn't closed properly by relay (i.e. > recovery_close_log isn't called), because the replica closes connection > for some reason (e.g. timeout). If this happens, the old xlog file > won't be removed when the replica reconnects, because we don't advance > replica->gc state on reconnect, so the useless xlog file won't be > removed until the next xlog file is relayed. This results in occasional > replication/gc.test.lua failures. Fix this by updating replica->gc on > reconnect with the current replica vclock. > > Closes #4034 > --- > https://github.com/tarantool/tarantool/issues/4034 > https://github.com/tarantool/tarantool/commits/dv/gh-4034-replication-update-gc-state-on-subscribe > > src/box/relay.cc | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Alexander Tikhonov confirms that this patch fixes the test failure. Pushed to 2.1.