[Tarantool-patches] [PATCH 3/3] replication: add test with random leaders promotion and demotion
Sergey Bronnikov
sergeyb at tarantool.org
Thu Nov 12 12:32:09 MSK 2020
Hi, Sergey!
Fixes applied in updated patch [1]
1. https://lists.tarantool.org/pipermail/tarantool-patches/2020-November/020636.html
On 16:03 Tue 01 Sep , Serge Petrenko wrote:
> > -- Testcase body.
> > for i=1,100 do \
> > test_run:eval(SERVERS[current_leader_id], \
> > "box.cfg{replication_synchro_quorum=6}") \
> > test_run:eval(SERVERS[current_leader_id], \
> > string.format("box.space.sync:insert{%d}", i)) \
> > new_leader_id = random(current_leader_id, 1, #SERVERS) \
> > test_run:eval(SERVERS[new_leader_id], \
> > "box.cfg{replication_synchro_quorum=3}") \
> > test_run:eval(SERVERS[new_leader_id], "box.ctl.clear_synchro_queue()") \
> > replica = random(new_leader_id, 1, #SERVERS) \
> > test_run:eval(SERVERS[replica], \
> > string.format("box.space.sync:get{%d}", i)) \
>
> It is not checked whether get returns any data or not.
> You only make a call but never check the return value.
>
> It'd also be nice to check whether the insert on the old leader (the one
> with
> quorum = 6) succeeds after the new leader executes `clear_synchro_queue`.
Added two wait_cond() to check value on a random replica and old leader.
Additionally expected total number of values checked right after the loop with
box.space.sync:count().
More information about the Tarantool-patches
mailing list