Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Subject: Re: [PATCH] replication: update replica gc state on subscribe
Date: Wed, 13 Mar 2019 16:38:39 +0300	[thread overview]
Message-ID: <20190313133838.hz56rt4o7yqctsjt@esperanza> (raw)
In-Reply-To: <b5b4809cf2e6d48230eb9e4301eac188b080e0f4.1552482730.git.vdavydov.dev@gmail.com>

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.

      reply	other threads:[~2019-03-13 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 13:13 Vladimir Davydov
2019-03-13 13:38 ` Vladimir Davydov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190313133838.hz56rt4o7yqctsjt@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=avtikhon@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] replication: update replica gc state on subscribe' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox