From: Oleg Babin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org Subject: Re: [Tarantool-patches] [PATCH 6/9] cfg: introduce 'deprecated option' feature Date: Wed, 10 Feb 2021 11:59:14 +0300 [thread overview] Message-ID: <7c06b831-923d-4b3d-4f4f-6288b0aa67c0@tarantool.org> (raw) In-Reply-To: <150f5ad2684cbeaf3b0aef2fd2a943dcfad23869.1612914070.git.v.shpilevoy@tarantool.org> Thanks for your patch! Is it possible to extend log message to "Option is deprecated and has no effect anymore"? Also for some options could be useful: "Option is deprecated, use ... instead" (e.g. for "weights"). Seems it should be more configurable and gives some hint for user to do. On 10/02/2021 02:46, Vladislav Shpilevoy wrote: > Some options in vshard are going to be eventually deprecated. For > instance, 'weigts' will be renamed, 'collect_lua_garbage' may be typo: weigts -> weights > deleted since it appears not to be so useful, 'sync_timeout' is > totally unnecessary since any 'sync' can take a timeout per-call. > > But the patch is motivated by 'collect_bucket_garbage_interval' > which is going to become unused in the new GC algorithm. > > New GC will be reactive instead of proactive. Instead of periodic > polling of _bucket space it will react on needed events > immediately. This will make the 'collect interval' unused. > > The option will be deprecated and eventually in some far future > release its usage will lead to an error. > > Needed for #147 > --- > vshard/cfg.lua | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/vshard/cfg.lua b/vshard/cfg.lua > index 1ef1899..28c3400 100644 > --- a/vshard/cfg.lua > +++ b/vshard/cfg.lua > @@ -59,7 +59,11 @@ local function validate_config(config, template, check_arg) > local value = config[key] > local name = template_value.name > local expected_type = template_value.type > - if value == nil then > + if template_value.is_deprecated then > + if value ~= nil then > + log.warn('Option "%s" is deprecated', name) > + end > + elseif value == nil then > if not template_value.is_optional then > error(string.format('%s must be specified', name)) > else
next prev parent reply other threads:[~2021-02-10 9:00 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-09 23:46 [Tarantool-patches] [PATCH 0/9] VShard Map-Reduce, part 1, preparations Vladislav Shpilevoy via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 1/9] rlist: move rlist to a new module Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:57 ` Oleg Babin via Tarantool-patches 2021-02-11 6:50 ` Oleg Babin via Tarantool-patches 2021-02-12 0:09 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 2/9] Use fiber.clock() instead of .time() everywhere Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:57 ` Oleg Babin via Tarantool-patches 2021-02-10 22:33 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 3/9] test: introduce a helper to wait for bucket GC Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:57 ` Oleg Babin via Tarantool-patches 2021-02-10 22:33 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-11 6:50 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 4/9] storage: bucket_recv() should check rs lock Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:59 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 5/9] util: introduce yielding table functions Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:59 ` Oleg Babin via Tarantool-patches 2021-02-10 22:34 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-11 6:50 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 6/9] cfg: introduce 'deprecated option' feature Vladislav Shpilevoy via Tarantool-patches 2021-02-10 8:59 ` Oleg Babin via Tarantool-patches [this message] 2021-02-10 22:34 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-11 6:50 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 7/9] gc: introduce reactive garbage collector Vladislav Shpilevoy via Tarantool-patches 2021-02-10 9:00 ` Oleg Babin via Tarantool-patches 2021-02-10 22:35 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-11 6:50 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 8/9] recovery: introduce reactive recovery Vladislav Shpilevoy via Tarantool-patches 2021-02-10 9:00 ` Oleg Babin via Tarantool-patches 2021-02-09 23:46 ` [Tarantool-patches] [PATCH 9/9] util: introduce binary heap data structure Vladislav Shpilevoy via Tarantool-patches 2021-02-10 9:01 ` Oleg Babin via Tarantool-patches 2021-02-10 22:36 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-11 6:51 ` Oleg Babin via Tarantool-patches 2021-02-12 0:09 ` Vladislav Shpilevoy via Tarantool-patches 2021-03-05 22:03 ` Vladislav Shpilevoy via Tarantool-patches 2021-02-09 23:51 ` [Tarantool-patches] [PATCH 0/9] VShard Map-Reduce, part 1, preparations Vladislav Shpilevoy via Tarantool-patches 2021-02-12 11:02 ` Oleg Babin via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7c06b831-923d-4b3d-4f4f-6288b0aa67c0@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=olegrok@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --cc=yaroslav.dynnikov@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 6/9] cfg: introduce '\''deprecated option'\'' feature' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox