Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov@tarantool.org, georgy@tarantool.org
Subject: Re: [tarantool-patches] [PATCH] replication: automatic skip duplicating rows in replication
Date: Sat, 28 Apr 2018 23:13:24 +0300	[thread overview]
Message-ID: <20180428201324.GB4588@atlas> (raw)
In-Reply-To: <20180413134412.20737-1-k.belyavskiy@tarantool.org>

* Konstantin Belyavskiy <k.belyavskiy@tarantool.org> [18/04/13 16:45]:

Konstantin, checking the configuration option for every
conflicting row is too much overhead.

Please instead implement a trigger which would push any change in
box.cfg to a global variable in replication module. 

> -			xstream_write_xc(applier->subscribe_stream, &row);
> +			if (xstream_write(applier->subscribe_stream, &row) != 0) {
> +				struct error *e = diag_last_error(diag_get());
> +				/**
> +				 * Silently skip ER_TUPLE_FOUND error if such
> +				 * option is set in config.
> +				 */
> +				if (e->type == &type_ClientError &&
> +				    box_error_code(e) == ER_TUPLE_FOUND &&
> +				    cfg_geti("replication_skip_conflict"))
> +					diag_clear(diag_get());
> +				else
> +					diag_raise();
> +			}

I'm talking about this bit.

Thanks!

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

      parent reply	other threads:[~2018-04-28 20:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 13:44 Konstantin Belyavskiy
2018-04-13 13:46 ` Vladimir Davydov
2018-04-18 12:30 ` Vladimir Davydov
2018-04-28 20:13 ` Konstantin Osipov [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=20180428201324.GB4588@atlas \
    --to=kostja@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov@tarantool.org \
    --subject='Re: [tarantool-patches] [PATCH] replication: automatic skip duplicating rows in replication' \
    /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