Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH] hot_standby: reflect amount of recovered rows in box.info
Date: Mon, 29 Oct 2018 20:15:42 +0300	[thread overview]
Message-ID: <20181029171542.da6lvmoyjknp4bdn@esperanza> (raw)
In-Reply-To: <20181023151540.33936-1-sergepetrenko@tarantool.org>

On Tue, Oct 23, 2018 at 06:15:40PM +0300, Serge Petrenko wrote:
> To be able to switch to hot_standby instance with minimal downtime, we
> need to know how far is it behind the primary instance, i.e. up to what
> vclock we have recovered. Previously this was impossible because
> box.info.vclock always referenced replicaset.vclock, which isn't updated
> during hot_standby.
> Introduce a pointer to relevant vclock: either recovery vclock (during
> local recovery) or replicaset.vclock (at all other times) and use it in
> box.info.vclock, box.info.lsn and box.info.signature.
> 
> Closes #3002
> ---
> https://github.com/tarantool/tarantool/issues/3002
> https://github.com/tarantool/tarantool/tree/sp/gh-3002-hot-standby-vclock
> 
>  src/box/box.cc                        | 12 +++++++++++-
>  src/box/box.h                         |  7 +++++++
>  src/box/lua/info.c                    |  6 +++---
>  test/replication/hot_standby.result   | 26 ++++++++++++++++++++++++++
>  test/replication/hot_standby.test.lua | 10 ++++++++++
>  5 files changed, 57 insertions(+), 4 deletions(-)
> 
> diff --git a/src/box/box.cc b/src/box/box.cc
> index c32f731b0..448fe3dcc 100644
> --- a/src/box/box.cc
> +++ b/src/box/box.cc
> @@ -138,6 +138,8 @@ static struct fiber_pool tx_fiber_pool;
>   */
>  static struct cbus_endpoint tx_prio_endpoint;
>  
> +struct vclock *last_row_vclock = &replicaset.vclock;
> +

I took a liberty of renaming last_row_vclock to box_vclock.

Pushed to 1.10.

      reply	other threads:[~2018-10-29 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 15:15 Serge Petrenko
2018-10-29 17:15 ` 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=20181029171542.da6lvmoyjknp4bdn@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] hot_standby: reflect amount of recovered rows in box.info' \
    /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