[Tarantool-patches] [PATCH] raft: add a test with synchronous replication

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Oct 4 16:54:10 MSK 2020


Hi! Thanks for the patch!

> diff --git a/test/replication/election_qsync.result b/test/replication/election_qsync.result
> new file mode 100644
> index 000000000..1bf13d7bc
> --- /dev/null
> +++ b/test/replication/election_qsync.result
> @@ -0,0 +1,125 @@
> +SERVERS = {'election_replica1', 'election_replica2', 'election_replica3'}
> + | ---
> + | ...
> +test_run:create_cluster(SERVERS, "replication", {args='2'})
> + | ---
> + | ...
> +test_run:wait_fullmesh(SERVERS)
> + | ---
> + | ...
> +
> +nrs = {true, true, true}

1. What is 'nrs'?

> + | ---
> + | ...
> diff --git a/test/replication/election_replica.lua b/test/replication/election_replica.lua
> index 36ea1f077..887d8a2a0 100644
> --- a/test/replication/election_replica.lua
> +++ b/test/replication/election_replica.lua
> @@ -19,8 +20,11 @@ box.cfg({
>      replication_timeout = 0.1,
>      election_is_enabled = true,
>      election_is_candidate = true,
> -    election_timeout = 0.1,
> -    replication_synchro_quorum = 3,
> +    -- Should be at least as big as replication_disconnect_timeout, which is
> +    -- 4 * replication_timeout.
> +    election_timeout = 0.4,

2. Why? Election timeout has nothing to do with disconnect. It is about
split vote. This also will slow down raft_basic.test.lua, which is not
supposed to be long. For heartbeat timeouts Raft already uses
replication_disconnect_timeout = replication_timeout * 4.


More information about the Tarantool-patches mailing list