From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <kostja.osipov@gmail.com>
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 <tarantool-patches@dev.tarantool.org>;
 Sat, 14 Dec 2019 15:26:47 +0300 (MSK)
Received: by mail-lj1-f196.google.com with SMTP id e28so1673261ljo.9
 for <tarantool-patches@dev.tarantool.org>;
 Sat, 14 Dec 2019 04:26:46 -0800 (PST)
Date: Sat, 14 Dec 2019 15:26:44 +0300
From: Konstantin Osipov <kostja.osipov@gmail.com>
Message-ID: <20191214122644.GA17689@atlas>
References: <cover.1575833120.git.v.shpilevoy@tarantool.org>
 <a5844a06bb9d4046bd8d01bf11c94ce2c8adc775.1575833120.git.v.shpilevoy@tarantool.org>
 <20191210083258.GD21413@atlas>
 <2c8fe897-9a9d-849d-463e-5fadff982b8c@tarantool.org>
 <20191211070830.GA5953@atlas>
 <b3c4f4bb-e8fa-8cb1-a54e-6a564b000188@tarantool.org>
 <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 <tarantool-patches.dev.tarantool.org>
List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe>
List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/>
List-Post: <mailto:tarantool-patches@dev.tarantool.org>
List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help>
List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org

* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [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