[tarantool-patches] Re: [PATCH v2 2/3] Put all new rows to the end of journal request
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Mar 7 13:53:21 MSK 2019
On Thu, Mar 07, 2019 at 01:38:13PM +0300, Konstantin Osipov wrote:
> * Georgy Kirichenko <georgy at tarantool.org> [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).
Sorry for what? I never asked for the two-pass implementation.
In fact, I asked Georgy to return to the previous approach, too.
>
> 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] ++;
TBO I find it hackish.
n_remote_rows / n_rows looks much easier for understanding IMO.
>
> and then the same loop as in the previous patch?
More information about the Tarantool-patches
mailing list