From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DE0432860D for ; Tue, 5 Mar 2019 04:28:11 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HvYjquZmC9eT for ; Tue, 5 Mar 2019 04:28:11 -0500 (EST) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 998AA281A6 for ; Tue, 5 Mar 2019 04:28:11 -0500 (EST) Date: Tue, 5 Mar 2019 12:28:09 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 3/3] Transaction support for applier Message-ID: <20190305092809.GB21955@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Georgy Kirichenko * Georgy Kirichenko [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