Re[2]: [patches] [cfg 1/1] cfg: Add constraints on box.cfg params

Ilya Markov imarkov at tarantool.org
Mon Mar 5 20:05:21 MSK 2018



>Can we change the default log_nonblock to nil, which means the
>default is derived from log type, true for pipe/syslog, false
>for file/stdout?
>

Yes, we can. So this conversion from nil to default depending on type
must be executed in lua or in box_check_config()?

>This would spare us from the useless warning. The patch will go to
>2.x after that.
>

Do you mean the patch with raising errors?

>What was the issue with moving the check for valid combinations
>to box_check_config()? 
>

It may be not so easy as in lua to add new cases. It requires add new `if`s for each case.
It may look ugly.

>How does the check work when log_nonblock or some other
>combination becomes invalid after initial configuration, e.g. in
>this scenario:
> box.cfg{}
>box.cfg{log_nonblock=true}?

It would not fail as parameter `log` is not specified.

>After giving this some thought, the only reason we're doing it here 
>is that we failed to refactor say.c and separate log string parser api 
>so that it can be called independently from  box_check_config. Am
>I right?
>

For checking loggers it's ok to implement it in box_check_config.
But if there are more constraints, it may be inconvenient.
>
><cut> a lot of changes which will become unnecessary if we change
>log_nonblock default after moving this problem to 2.0.
>
>-- 
>Konstantin Osipov, Moscow, Russia,  +7 903 626 22 32
> http://tarantool.org -  www.twitter.com/kostja_osipov


-- 
Thank you,
Ilya Markov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180305/d37d0e87/attachment.html>


More information about the Tarantool-patches mailing list