[Tarantool-patches] [PATCH v4] qsync: provide box.info.synchro interface for monitoring

Serge Petrenko sergepetrenko at tarantool.org
Thu Apr 8 16:17:23 MSK 2021



08.04.2021 16:13, Cyrill Gorcunov пишет:
> On Thu, Apr 08, 2021 at 03:58:38PM +0300, Serge Petrenko wrote:
>> 08.04.2021 15:18, Cyrill Gorcunov пишет:
>>> In commit 14fa5fd82 (cfg: support symbolic evaluation of
>>> replication_synchro_quorum) we implemented support of
>>> symbolic evaluation of `replication_synchro_quorum` parameter
>>> and there is no easy way to obtain it current run-time value,
>>> ie evaluated number value.
>>>
>>> Moreover we would like to fetch queue length on transaction
>>> limbo for tests and extend this statistics in future. Thus
>>> lets add them.
>>>
>>> Closes #5191
>> Thanks for the fixes!
>>
>> Please return `box.info.synchro.quorum` assertions to the
>> test regarding quorum evaluation. Like you had it in the
>> previous patch version.
>>
> Say like this?

Yes, but better do it in the test `replication/gh-5446-qsync-eval-quorum`

> ---
> diff --git a/test/replication/qsync_basic.result b/test/replication/qsync_basic.result
> index 3457d2cc9..985a5baff 100644
> --- a/test/replication/qsync_basic.result
> +++ b/test/replication/qsync_basic.result
> @@ -653,6 +653,13 @@ test_run:cmd('switch default')
>    | ---
>    | - true
>    | ...
> +box.cfg{ replication_synchro_quorum = "N/2+1" }
> + | ---
> + | ...
> +assert(box.info.synchro.quorum == 2)
> + | ---
> + | - true
> + | ...
>   test_run:cmd('stop server replica')
>    | ---
>    | - true
> diff --git a/test/replication/qsync_basic.test.lua b/test/replication/qsync_basic.test.lua
> index a604d80ee..a1787648f 100644
> --- a/test/replication/qsync_basic.test.lua
> +++ b/test/replication/qsync_basic.test.lua
> @@ -261,6 +261,8 @@ box.space.sync:count()
>   -- and do not switch to other nodes.
>   --
>   test_run:cmd('switch default')
> +box.cfg{ replication_synchro_quorum = "N/2+1" }
> +assert(box.info.synchro.quorum == 2)
>   test_run:cmd('stop server replica')
>   assert(box.info.synchro.queue.len == 0)
>   box.cfg{replication_synchro_timeout = 2}

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list