Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
	Georgy Kirichenko <georgy@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [tarantool-patches] [PATCH v3 4/4] replication: use wal memory buffer to fetch rows
Date: Tue, 22 Oct 2019 01:07:23 +0200	[thread overview]
Message-ID: <e6155e58-0030-e485-0bd5-9f472ab66162@tarantool.org> (raw)
In-Reply-To: <0b5ca0bc9f891c3c5363a0e3275c662f93a813de.1570639218.git.georgy@tarantool.org>

Thanks for the patch!

On 09/10/2019 18:45, Georgy Kirichenko wrote:
> Fetch data from wal in-memory buffer. Wal allows to start a fiber
> which creates a xrow buffer cursor with given vclock and then fetches
> row from the xrow buffer one by one and calls given callback for each
> row. Also the wal relaying fiber send a heartbeat message if all
> rows were processed there were no rows written for replication timeout
> period.

Sorry, I didn't understand the last sentence. Maybe if all rows
were processed *and* there were no rows?

See 2 comments below.

> Relay connects to wal with a replica known vclock and tries to
> relay data. In case of outdated vclock (wal could not create a cursor
> or fetch new row from the cursor) the relay makes a fallback in
> order to read logged data from file and then makes another try
> to connect to wal with updated vclock and so waiter.
> In file mode a relay already has a data to send to a replica so from
> not the relay  has not any duty to send heartbeat messages - it

1. 'so from not the relay has not' - I didn't understand it. Could
you please rephrase?

> is done by wal relay fiber while it waits for new transactions
> written by wal.
> 
> Closes #3794
> ---
>  src/box/relay.cc                              | 180 +++++++++---------
>  src/box/wal.c                                 | 158 +++++++++++++++
>  src/box/wal.h                                 |  60 ++++++
>  src/lib/core/cbus.c                           |   4 +
>  src/lib/core/errinj.h                         |   1 +
>  test/box/errinj.result                        |   2 +
>  test/replication/force_recovery.result        |   8 +
>  test/replication/force_recovery.test.lua      |   2 +
>  test/replication/replica_rejoin.result        |   8 +
>  test/replication/replica_rejoin.test.lua      |   2 +
>  .../show_error_on_disconnect.result           |   8 +
>  .../show_error_on_disconnect.test.lua         |   2 +
>  test/replication/suite.ini                    |   2 +-
>  test/xlog/panic_on_wal_error.result           |  12 ++
>  test/xlog/panic_on_wal_error.test.lua         |   3 +
>  test/xlog/suite.ini                           |   2 +-
>  16 files changed, 365 insertions(+), 89 deletions(-)
> 
> diff --git a/test/replication/force_recovery.result b/test/replication/force_recovery.result
> index f50452858..e48c12657 100644
> --- a/test/replication/force_recovery.result
> +++ b/test/replication/force_recovery.result
> @@ -16,6 +16,10 @@ _ = box.space.test:create_index('primary')
>  box.schema.user.grant('guest', 'replication')
>  ---
>  ...
> +box.error.injection.set("ERRINJ_WAL_MEM_IGNORE", true)

2. Unfortunately, you can't set error injections in
Release mode. It means, that all these injection.set are
nop in Release. Please, remove them. If you want to use
an error injection, you need to write a special test file,
and disable it for the Release build.

> +---
> +- ok
> +...
>  -- Deploy a replica.
>  test_run:cmd("create server test with rpl_master=default, script='replication/replica.lua'")
>  ---

      parent reply	other threads:[~2019-10-21 23:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1570639218.git.georgy@tarantool.org>
2019-10-21 23:06 ` [Tarantool-patches] [tarantool-patches] [PATCH v3 0/4] From memory wal replication Vladislav Shpilevoy
     [not found] ` <99ef4fdb53bfd4fb1c47f2cf2ebb0f333761506e.1570639218.git.georgy@tarantool.org>
2019-10-21 23:06   ` [Tarantool-patches] [tarantool-patches] [PATCH v3 1/4] relay: adjust gc state on relay status update Vladislav Shpilevoy
     [not found] ` <e45d765c21500974a7d6676ea1455a9e617f30c9.1570639218.git.georgy@tarantool.org>
2019-10-21 23:06   ` [Tarantool-patches] [tarantool-patches] [PATCH v3 2/4] wal: xrow buffer structure Vladislav Shpilevoy
     [not found] ` <8f3fc4b1a2b9c2d071225e11a863d2facd3d035e.1570639218.git.georgy@tarantool.org>
2019-10-21 23:06   ` [Tarantool-patches] [tarantool-patches] [PATCH v3 3/4] wal: xrow buffer cursor Vladislav Shpilevoy
     [not found] ` <0b5ca0bc9f891c3c5363a0e3275c662f93a813de.1570639218.git.georgy@tarantool.org>
2019-10-21 23:07   ` Vladislav Shpilevoy [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=e6155e58-0030-e485-0bd5-9f472ab66162@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [Tarantool-patches] [tarantool-patches] [PATCH v3 4/4] replication: use wal memory buffer to fetch rows' \
    /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