From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 397CF6C1BE; Wed, 10 Feb 2021 12:00:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 397CF6C1BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612947613; bh=JiWfF6VLnIR7i+wksU2EediThqIpyJpf7LeWCzlCOOQ=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HEsWVEPPTD4h8PYFKY1r3qb8isPMCcMzVKpfTg604INtSj5LXE104cXLLrpSEPQhD 167nrZYb05aDMSeFhUeDyj5khbUwNmc3r4ESsXwg+G3wmiebdsUmgvRACAt0zEjbU/ W/XTiXhL/ugfTepbEeddmcefiMrDIkdlSW6wGYXk= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AFA356C1BE for ; Wed, 10 Feb 2021 11:59:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AFA356C1BE Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1l9lL9-0004xf-M1; Wed, 10 Feb 2021 11:59:16 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org References: <150f5ad2684cbeaf3b0aef2fd2a943dcfad23869.1612914070.git.v.shpilevoy@tarantool.org> Message-ID: <7c06b831-923d-4b3d-4f4f-6288b0aa67c0@tarantool.org> Date: Wed, 10 Feb 2021 11:59:14 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <150f5ad2684cbeaf3b0aef2fd2a943dcfad23869.1612914070.git.v.shpilevoy@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9C4647521586BE7E637AB8B70F7375365A182A05F538085040B65798A617BF717D9B92D1D27014ED2F202D593DD375128067E8B406E484EB00 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE742D9BD90C58D50E0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063799A9E55CA76E18AB8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC8767A9B625D33EB4DF692D9683139014CB76356039F977EF389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C05A64D9A1E9CA65708941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D6FBC3EC642A93BBCC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C224938DC91D6DFF5CF1A76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8BC99BB6BC3342C9403AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7AD122C37AACC1F0267F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C32C5FCA5927F7B458089D37D7C0E48F6C5571747095F342E857739F23D657EF2B6825BDBE14D8E7028C9DFF55498CEFB0BD9CCCA9EDD067B1EDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5EC3AD99BC3CCECF70A046BE7F56209D7AD21336D7F3E2FB1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AE88D5ADEBE7C983144D22191A0B20A0736321E791A8AB6D34133DB3C78009309D393A1E3D5222E31D7E09C32AA3244C41BD50018742DBFFEE99D5791D77C24033C9DC155518937FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmMmQ+JvDeDH/GplpApPyhg== X-Mailru-Sender: E02534FE7B43636DC6DBEBE964139794CE077B4D94DFB435D52C043EDB67FFE9BC86AE28D41BC5CE23E75C7104EB1B885DEE61814008E47C7013064206BFB89F93956FB04BA385BE9437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 6/9] cfg: introduce 'deprecated option' feature X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Oleg Babin via Tarantool-patches Reply-To: Oleg Babin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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