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 C498770361; Wed, 10 Feb 2021 02:49:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C498770361 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612914563; bh=S9OvPm4r9sD2Hfnmq+s/pXCsFPHWP6Uti7p9fEtuuSM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=GcfyUgcihPUBXLlXQgolGwUUvVbHOm4RFzKuAkkmEIHx87A057BF9VptxJrdpwGPc AFKkZG8hOJbtRCLCQzNk+rXIaz0iDnByQlvGuiXCrZJ0ajgQd1C/+ANrcmi7fVAABN S6M9Qt0DvgWaZQgFSX7xNqu1YzhsKbHTXssuL0J8= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 AB2016AABE for ; Wed, 10 Feb 2021 02:46:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AB2016AABE Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l9ci6-0002gH-M7; Wed, 10 Feb 2021 02:46:23 +0300 To: tarantool-patches@dev.tarantool.org, olegrok@tarantool.org, yaroslav.dynnikov@tarantool.org Date: Wed, 10 Feb 2021 00:46:12 +0100 Message-Id: <150f5ad2684cbeaf3b0aef2fd2a943dcfad23869.1612914070.git.v.shpilevoy@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9C3D690943982D6E894AC6DB5C833CB876182A05F538085040867ACCFEAC5410A7A21E07825EC734347DB4C3D258BC60DC6FBDF4CBB7AC81FB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77E216A0E97507353EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373768BF035B57E5168638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCA6073DB25481D6C55795F49B883D7EFB93FEC865EF685146389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0FE6165853F4646218941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6AE6B62100CB10EE2CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC9149C560DC76099D75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E735B344165809136645C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0FECB2555BB02FD5A93B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CFE63F531D4BE5B71B6DA67084D741BA52875AD236E7E27A89C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D16EA493CC1FD9F8F19BE0408E0F691CB00970A3DEB1D37AD42CE5C4F197C6D468016E45981D77B61D7E09C32AA3244C06FAE4D13E0C6AE549A61E121C2940B1F94338140B71B8EEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmMmQ+JvDeDHAt6JB5LNBBw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638222E36EBB76AD300575EDD0D3DFCC41D973841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: [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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Some options in vshard are going to be eventually deprecated. For instance, 'weigts' will be renamed, 'collect_lua_garbage' may be 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 -- 2.24.3 (Apple Git-128)