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 BDB732922C for ; Thu, 7 Mar 2019 05:38:16 -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 bt64-To0PSYJ for ; Thu, 7 Mar 2019 05:38:16 -0500 (EST) Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 CBBFA291ED for ; Thu, 7 Mar 2019 05:38:15 -0500 (EST) Date: Thu, 7 Mar 2019 13:38:13 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 2/3] Put all new rows to the end of journal request Message-ID: <20190307103813.GF5263@chai> References: <2134b8fca0963ebd0a8fb818a66cd05e81ef09a6.1551902962.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2134b8fca0963ebd0a8fb818a66cd05e81ef09a6.1551902962.git.georgy@tarantool.org> 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/07 11:20]: > Form a separate transaction with all local changes in case of replication. > This is important because we should be able to replicate such changes > (e.g. made within an on_replace triggers) back. In the opposite case > local changes will be incorporated into originating transaction and > wold be skipped by originator replica. > > Needed for: #2798 OK, this patch makes much more sense than the previous one -perhaps because this has become an isolated change. I liked a single pass over the list of transaction rows more, obviously (sorry Vova). Could you please return to the idea of the previous patch? /* 0 - count of local rows, 1 - count of remote rows We need two different counters to make sure that local and remote transaction is */ int n_rows[2]; txn->n_rows[stmt->replica_id == instance_id] ++; and then the same loop as in the previous patch? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov