[Tarantool-patches] [PATCH v9 1/1] applier: filter incoming synchro packets via transaction initiator

Serge Petrenko sergepetrenko at tarantool.org
Wed Jun 16 11:31:35 MSK 2021



15.06.2021 21:08, Cyrill Gorcunov пишет:
> On Tue, Jun 15, 2021 at 08:02:59PM +0300, Cyrill Gorcunov wrote:
>> On Tue, Jun 15, 2021 at 05:26:06PM +0300, Serge Petrenko wrote:
>>>> +box.space.sync:select{}
>>>> + | ---
>>>> + | - - [1]
>>>> + | ...
>>> You need to wait for the space creation, just like
>>> you do below. Otherwise the test'll be flaky.
>>> Also, please see a comment regarding wait_lsn vs wait_cond
>>> below.
>> As being discussed due to quorum=2 and sync space we don't need
>> to wait.
>>
>>>> +test_run:wait_cond(function() return                    \
>>>> +                   box.space.sync ~= nil and            \
>>>> +                   box.space.sync:get{1} ~= nil and     \
>>>> +                   box.space.sync:get{1}[1] == 1 end, 100)
>>>> + | ---
>>>> + | - true
>>>> + | ...
>>> I suggest you use wait_lsn('replica2', 'master') here
>>> instead of this bulky wait_cond.
>>> First of all, it takes a single line, instead of 4 lines.
>>>
>>> Secondly, you forgot to test `box.space.sync.index.pk ~= nil`, meaning
>>> the test will still fail occasionally, when index creation doesn't replicate
>>> in time.
>> You mean something like below?
>> ---
> I force pushed an update.

Thanks for the fixes!

I assume the new branch is
gorcunov/gh-6035-applier-filter-9

LGTM.


-- 
Serge Petrenko



More information about the Tarantool-patches mailing list