[Tarantool-patches] [PATCH] applier: follow vclock to the last tx row

Serge Petrenko sergepetrenko at tarantool.org
Thu Apr 23 14:19:17 MSK 2020


> 23 апр. 2020 г., в 12:54, Cyrill Gorcunov <gorcunov at gmail.com> написал(а):
> 
> On Thu, Apr 23, 2020 at 12:53:30PM +0300, Serge Petrenko wrote:
>> 
>>> 23 апр. 2020 г., в 12:41, Cyrill Gorcunov <gorcunov at gmail.com> написал(а):
>>> 
>>> On Wed, Apr 22, 2020 at 09:28:10PM +0300, Serge Petrenko wrote:
>>>> Since the introduction of transaction boundaries in replication
>>>> protocol, appliers follow replicaset.applier.vclock to the lsn of the
>>>> first row in an arrived batch. This is enough and doesn't lead to errors
>>>> when replicating from other instances, respecting transaction boundaries
>>>> (instances with version 2.1.2 and up). However, if there's a 1.10
>>>> instance in 2.1.2+ cluster, it sends every single tx row as a separate
>>>> transaction, breaking the comparison with replicaset.applier.vclock and
>>>> making the applier apply part of the changes, it has already applied
>>>> when processing a full transaction coming from another 2.x instance.
>>>> Such behaviour leads to ER_TUPLE_FOUND errors in the scenario described
>>>> above.
>>>> In order to guard from such cases, follow replicaset.applier.vclock to
>>>> the lsn of the last row in tx.
>>>> 
>>>> Closes #4924
> Reviewed-by: Cyrill Gorcunov <gorcunov at gmail.com>
> 
> Thanks!


@ChangeLog
  - fix possible ER_TUPLE_FOUND error when bootstrapping
    2.2+ replicas in an 1.10/2.1.1 cluster (gh-4924)

--
Serge Petrenko
sergepetrenko at tarantool.org


More information about the Tarantool-patches mailing list