[tarantool-patches] Re: [PATCH 2/2] Fix discovery/reconfigure race

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jun 28 22:41:32 MSK 2018


Thanks for the patch! I pushed it.

On 27/06/2018 22:50, Alex Khatskevich wrote:
> 
>>>   ...
>>> +--
>>> +-- Check route_map is not filled with old replica objects after
>>> +-- reconfigure.
>>> +--
>>> +-- Simulate long `callro`.
>>> +vshard.router.internal.errinj.ERRINJ_LONG_DISCOVERY = true;
>>> +---
>>> +...
>>> +while not vshard.router.internal.errinj.ERRINJ_LONG_DISCOVERY == 'waiting' do
>>
>> 1. Why 'not value == needed_value'? Why not 'value ~= needed_value'? And how
>> does it work? I checked this thing in Lua and got these results:
>>
>> Please, investigate why your test passes even without this cycle again.
> Priorities...
> Fixed.
> Test was passing because it always passes on the new implementation, and fails only on old implementation and  this cycle makes the probability of failure 100% in this case.
> After your finding, I have returned the old implementation and made sure that it really fails.
>>
>>> +    vshard.router.discovery_wakeup()
>>> +    fiber.sleep(0.02)
>>> +end;
>>> +---
>>> +...
>>> +vshard.router.cfg(cfg);
>>> +---
>>> +...
>>> +route_map = vshard.router.internal.route_map
>>> +for bucket_id, _ in pairs(route_map) do
>>> +    route_map[bucket_id] = nil
>>> +end;
>>
>> 2. Why not just 'vshard.router.internal.route_map = {}' ?
> Fixed
> 
> 




More information about the Tarantool-patches mailing list