[Tarantool-patches] [PATCH v2 2/3] cfg: support symbolic evaluation of replication_synchro_quorum

Serge Petrenko sergepetrenko at tarantool.org
Wed Nov 25 15:46:04 MSK 2020


25.11.2020 15:12, Cyrill Gorcunov пишет:
> On Wed, Nov 25, 2020 at 03:04:07PM +0300, Serge Petrenko wrote:
>> Just noticed. Looks like this diag_set and the one below are ignored:
>> ```
>> tarantool> a=string.rep('n', 1000)
>> ---
>> ...
>>
>> tarantool> box.cfg{replication_synchro_quorum=a}
>> ---
>> - error: 'Incorrect value for option ''replication_synchro_quorum'': the
>> value must
>>      be greater than zero and less than maximal number of replicas'
>> ...
> Indeed. Actually if you remember I've been using errno for such errors.
> Now we either should call diag_log() right after diag_set or return
> errno handling?
Why? Every time eval returns a value < 0 this means an error.
Just add a check to check_replication_synchro_quorum.
eval's return value is ignored here, and diag is rewritten with an 
unrelated error.

-- 
Serge Petrenko



More information about the Tarantool-patches mailing list