Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alex Khatskevich <avkhatskevich@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 2/2] Fix discovery/reconfigure race
Date: Wed, 27 Jun 2018 22:50:01 +0300	[thread overview]
Message-ID: <8fce9646-0b30-1d67-3552-72a525836f5c@tarantool.org> (raw)
In-Reply-To: <cfaa91ab-1a30-ee1c-55d4-e702d7ef0f0a@tarantool.org>


>>   ...
>> +--
>> +-- 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

  reply	other threads:[~2018-06-27 19:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 12:47 [tarantool-patches] [PATCH 0/2][vshard] preserve route map AKhatskevich
2018-06-15 12:47 ` [tarantool-patches] [PATCH 1/2] Preserve route_map on router.cfg AKhatskevich
2018-06-21 12:54   ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-25 12:48     ` Alex Khatskevich
2018-06-15 12:47 ` [tarantool-patches] [PATCH 2/2] Fix discovery/reconfigure race AKhatskevich
2018-06-21 12:54   ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-25 12:48     ` Alex Khatskevich
2018-06-26 11:11       ` Vladislav Shpilevoy
2018-06-26 14:03         ` Alex Khatskevich
2018-06-27 11:45           ` Vladislav Shpilevoy
2018-06-27 19:50             ` Alex Khatskevich [this message]
2018-06-28 19:41               ` Vladislav Shpilevoy
2018-06-21 12:54 ` [tarantool-patches] Re: [PATCH 0/2][vshard] preserve route map Vladislav Shpilevoy
2018-06-25 11:52   ` Alex Khatskevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fce9646-0b30-1d67-3552-72a525836f5c@tarantool.org \
    --to=avkhatskevich@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH 2/2] Fix discovery/reconfigure race' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox