From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1B4C246971A for ; Sat, 14 Dec 2019 15:26:47 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id e28so1673261ljo.9 for ; Sat, 14 Dec 2019 04:26:46 -0800 (PST) Date: Sat, 14 Dec 2019 15:26:44 +0300 From: Konstantin Osipov Message-ID: <20191214122644.GA17689@atlas> References: <20191210083258.GD21413@atlas> <2c8fe897-9a9d-849d-463e-5fadff982b8c@tarantool.org> <20191211070830.GA5953@atlas> <20191212084603.GA24448@atlas> <96368326-84a1-0b3c-15f8-54e3d044db85@tarantool.org> <20191213075850.GA21575@atlas> <60d9ec76-50be-ecae-175c-520975c928f9@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60d9ec76-50be-ecae-175c-520975c928f9@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org * Vladislav Shpilevoy [19/12/14 02:13]: > lbox_fiber_run_f is not called for C fibers. This is for Lua born > fibers only. To invoke a C function Lua is not used. It can't access fiber storage. > >> 2) That will give exactly the same - a member in struct fiber. > >> There just no other communication channel between different > >> frontends in which a fiber may participate during lifetime; > > > > Why do you think there will be different frontends involved? The > > storage is pure-Lua, there is no fiber storage for non-Lua fibers. > > > > Because other frontends will appear. request storage is specific to Lua which doesn't have Go-style deferrables, Python-style finally() or any other working means for controlled garbage collection. Even in Lua it is better done as a third party library, which works the same way as box.atomic(): wraps the request body with a RAII-style function. This feature *is* broken & redundant, and instead of making the damage controlled, you want to "fix" it by making the feature universal and implementing it on C level. > > >> 3) We would need to add a new member to struct fiber and > >> increase its size. > > > > Please see above, do you get the idea now? > > No. I don't understand what you want and how. -- Konstantin Osipov, Moscow, Russia