Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Georgy Kirichenko <georgy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 3/3] Transaction support for applier
Date: Tue, 5 Mar 2019 12:28:09 +0300	[thread overview]
Message-ID: <20190305092809.GB21955@chai> (raw)
In-Reply-To: <f7da57ec765aae5b550842f435d69a56e9585761.1551644303.git.georgy@tarantool.org>

* Georgy Kirichenko <georgy@tarantool.org> [19/03/03 23:30]:
> @@ -271,14 +276,20 @@ txn_write_to_wal(struct txn *txn)
>  		return -1;
>  
>  	struct txn_stmt *stmt;
> -	struct xrow_header **row = req->rows;
> +	struct xrow_header **remote_row = req->rows;
> +	struct xrow_header **local_row = req->rows + txn->n_remote_rows;
>  	stailq_foreach_entry(stmt, &txn->stmts, next) {
>  		if (stmt->row == NULL)
>  			continue; /* A read (e.g. select) request */
> -		*row++ = stmt->row;
> +		if (stmt->row->replica_id != 0 &&
> +		    stmt->row->replica_id != instance_id)
> +			*remote_row++ = stmt->row;
> +		else
> +			*local_row++ = stmt->row;
>  		req->approx_len += xrow_approx_len(stmt->row);
>  	}
> -	assert(row == req->rows + req->n_rows);
> +	assert(remote_row == req->rows + txn->n_remote_rows);
> +	assert(local_row == req->rows + req->n_rows);

AFAIU this patch tests local rows by means of
replication_skip_conflict option. Could you please also test it
with local on_replace/before_replace triggers? Besides, now that
applier issues multi-statement transactions, we could add a test
for on_commit/on_rollback triggers fired from applier as well. We
could set such triggers from statement-level triggers.


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

  parent reply	other threads:[~2019-03-05  9:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 20:26 [tarantool-patches] [PATCH 0/3] Transaction boundaries " Georgy Kirichenko
2019-03-03 20:26 ` [tarantool-patches] [PATCH 1/3] Applier gets rid of a xstream Georgy Kirichenko
2019-03-05  8:52   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:19   ` [tarantool-patches] " Vladimir Davydov
2019-03-03 20:26 ` [tarantool-patches] [PATCH 2/3] Merge apply row and apply_initial_join_row Georgy Kirichenko
2019-03-05  9:06   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:26   ` [tarantool-patches] " Vladimir Davydov
2019-03-03 20:26 ` [tarantool-patches] [PATCH 3/3] Transaction support for applier Georgy Kirichenko
2019-03-05  9:11   ` [tarantool-patches] " Konstantin Osipov
2019-03-05 10:28     ` Vladimir Davydov
     [not found]       ` <20190305112333.GA30697@chai>
2019-03-05 11:27         ` Vladimir Davydov
2019-03-05  9:13   ` Konstantin Osipov
2019-03-05  9:25   ` Konstantin Osipov
2019-03-05  9:28   ` Konstantin Osipov [this message]
2019-03-05 11:59   ` [tarantool-patches] " Vladimir Davydov

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=20190305092809.GB21955@chai \
    --to=kostja@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 3/3] Transaction support for applier' \
    /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