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 3A7B28205E; Sun, 24 Jan 2021 19:28:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3A7B28205E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611505686; bh=LWKpNnnCE/CSalFIFjLyLlXuJNKVOqjVVTJIgmWeAXU=; 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=f0CIZFatBGmfMOLjNeTA/svJOR+jS9ASUJAZ65P+oobts//0eaQIFT/2iOUPyirXO kTYmO8QDFJdUJei0fE4bpl7KxLdGwWQ2Bn32S95j0UUFRP5ZbC3e+dSBFq6WpHE4ef kfRYJI7IChwpj04xsXJWOsI5rdFBl+X7oMtWJnic= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 4082157E48 for ; Sun, 24 Jan 2021 19:27:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4082157E48 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l3iER-0001zC-OQ; Sun, 24 Jan 2021 19:27:20 +0300 To: Cyrill Gorcunov , tml References: <20210118203556.281700-1-gorcunov@gmail.com> <20210118203556.281700-5-gorcunov@gmail.com> <20210119124649.GA2185@grain> Message-ID: <9a2214b5-02e4-0c7f-dba4-7afaf51082f1@tarantool.org> Date: Sun, 24 Jan 2021 17:27:18 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210119124649.GA2185@grain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F0E84CC1954AA4380A9873322CD039BEC171744CCDDEE96200894C459B0CD1B91E1ED3BFB425AA9F514A79E284288CDEE677AB1C9F20D3C84D4D0ABEC86BDBF1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75AD53DF1D86BACA3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375B4C42A189C515578638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC520051DBA2F12A10788D2B2679199056A6CC4F8938F76D85389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0DEC8C2C8BCD2534D8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B68424CA1AAF98A6958941B15DA834481F9449624AB7ADAF3735872C767BF85DA29E625A9149C048EE0A3850AC1BE2E735F1C9CF18C8EB22694AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8BAEFF4136F5E2B48575ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57E8FBB06288C1946000306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5646E9025C4DCB554B1367205253B923C1FD5A1C38682F4D3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3488E5CD2E691F5566FE92D23BB3FA72ADBC440FD8C1C1D1970804DBCE9CF798138B3C63BE735AFAAA1D7E09C32AA3244C0013E879C3545105EB4AD7BD618CAC7F3FD9C8CA1B0515E0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojEcKN7r9rK/0yBI4cTbLU7Q== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822FEA4182C347CBA870EAC8E95B7F5A9EF3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload 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" Thanks for the patch! On 19.01.2021 13:46, Cyrill Gorcunov wrote: > On Mon, Jan 18, 2021 at 11:35:52PM +0300, Cyrill Gorcunov wrote: >> Currently when we reload modules we remove old instance >> from the module cache and then try to insert a new one >> back. Note that module cache is a string based hash table: >> we lookup for a pointer to the module via package name. > > This approach doesn't work. Why? > --- > From: Cyrill Gorcunov > Date: Tue, 12 Jan 2021 11:53:50 +0300 > Subject: [PATCH v12 4/8] module_cache: panic if module cache update failed > > Currently when we reload modules we remove old instance > from the module cache and then try to insert a new one > back. If error happens inbetween (say machine reached > lack of memory and hash resize failed) we try to restore > functions on old module. This is fine but we can't continue > working with modules -- next reload action won't find > the module in hash and won't reload. Since this is a really > rare case plain panic should be fine here. > > Part-of #4642 > > Signed-off-by: Cyrill Gorcunov > ---