[Tarantool-patches] [PATCH v4 07/12] raft: filter rows based on known peer terms

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Apr 18 19:27:40 MSK 2021


> diff --git a/test/replication/gh-5445-leader-inconsistency.result b/test/replication/gh-5445-leader-inconsistency.result
> new file mode 100644
> index 000000000..5c6169f50
> --- /dev/null
> +++ b/test/replication/gh-5445-leader-inconsistency.result
> @@ -0,0 +1,292 @@

<...>

> +-- Old leader returns and old unconfirmed rows from it must be ignored.
> +-- Note, it wins the elections fairly.
> +test_run:cmd('start server '..leader..' with args="3 0.4 voter"')
> + | ---
> + | - true
> + | ...
> +test_run:wait_lsn(leader, next_leader)
> + | ---
> + | ...
> +test_run:switch(leader)
> + | ---
> + | - true
> + | ...
> +test_run:wait_cond(function() return box.space.test:get{2} == nil end)
> + | ---
> + | - true
> + | ...
> +box.cfg{election_mode='candidate'}
> + | ---
> + | ...
> +
> +test_run:switch('default')
> + | ---
> + | - true
> + | ...
> +test_run:switch(next_leader)

You might want to add a check here, that the 'next_leader'
node didn't re-apply any rows from the old leader. So {2} still
does not exist even after these two nodes are in full sync.


More information about the Tarantool-patches mailing list