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 2C6896EC5D; Mon, 5 Apr 2021 14:42:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2C6896EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617622965; bh=nmvOdX0O2xPwH6xgSlF8N9tapVnfFFLIn3cPoxu9CEQ=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=NjEQDQoOJ1ElarILGytrya/3FrL6ksbEvgk2pkKAd+ZxVBozjhxd8/XAUt/4z7Q/d OdkJy+Mr4BwmuhaLDONTLHqf9pnW+PUK0JeD7/HqJtGoegLNVknvkwAK5J8bPPhMQz t2sThqFPjwmsQniV9oHyIcIeNbKUe9cV3vlMnqo8= Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 ED2016EC5D for ; Mon, 5 Apr 2021 14:42:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ED2016EC5D Received: by smtp40.i.mail.ru with esmtpa (envelope-from ) id 1lTNcw-0008Do-IS; Mon, 05 Apr 2021 14:42:43 +0300 To: Cyrill Gorcunov References: <20210402123420.885834-1-gorcunov@gmail.com> <20210402123420.885834-4-gorcunov@gmail.com> Message-ID: <14a95af1-ce4e-ddab-1496-7cb728f7d433@tarantool.org> Date: Mon, 5 Apr 2021 14:42:40 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32941B7C4A78AC10F96A7797F60C25BD4B06182A05F53808504053CA92C0C20FEEC8FAE20B28CF243F615C077263F5E576B07F82095B8A21AC32 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79379E597596E9183EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371E8C7BD479B346ED8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C16EE06F5A270FE6A210F31ABA4F61E54E99CC1A1C075B460A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE7850F8B975A76562C9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3253F27DA5A70FAF3117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF4C8DE2EC522DB058BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B66EFF71F1B3C06F723AA81AA40904B5D9DBF02ECDB25306B2201CA6A4E26CD07C3BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE493D58E677C372A3F477649B479DD24E3CAC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A51025AE8DB5732AEAA6520853C6249648088F3749C6E1E8D2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34FD9114F69CA58D1E5CFE27493F9AB44BE2CB24DCFB20359BA92D42A127C0E09B1BDF3C5608D733541D7E09C32AA3244CF3928848A995DC6AC878D821349BEE94FE8DA44ABE2443F7927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojM00ve/f+0omB5C/J2L+W2w== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8274B2D1C1836A9B3CC371C91C52C854DAF42C1C738D68B53424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v20 3/7] box/func: fix modules functions restore 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tml , Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 05.04.2021 14:26, Cyrill Gorcunov пишет: >> 02.04.2021 15:34, Cyrill Gorcunov пишет: >>> In commit 96938fafb an ability to hot reload of modules >>> has been introduced. When module is been reloaded his >> typo: either 'is being reloaded' or 'has been reloaded'. > Thanks! Surely it should be "is being". > >>> - * Some old-dso func can't be load from new module, restore old >>> - * functions. >>> + * Some old functions are not found int the new module, >>> + * thus restore all migrated functions back to original. >> typo: in the new module. > Thanks! > >>> @@ -419,9 +420,7 @@ module_reload(const char *package, const char *package_end) >>> } >>> func->module = old_module; >>> rlist_move(&old_module->funcs, &func->item); >>> - } while (func != rlist_first_entry(&old_module->funcs, >>> - struct func_c, item)); >>> - assert(rlist_empty(&new_module->funcs)); >> Let's keep this assert. > The cycle is removing entries from the list and for this purpose > the cycle is using a "safe" form. I would prefer to drop this > useless assert() because a few lines above we are doing entries > removing. Frankly I don't understand why it has been introduced > in first place, maybe because this stange and buggy form of > "func != rlist_first_entry", dunno. > > So if there is no really strong reason why should we keep this > assert I would love to drop it. > > Look, here is what we have > > list_for_each_entry_safe(item, head, ...) > list_move(item, new_head) > > a few obvious lines. And list is clear once the @item reaches @head. Ok, drop it then. I have no serious objections. > > But if you still think it is better to keep and I didn't convince > you, then sure, I'll bring it back. -- Serge Petrenko