Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja.osipov@gmail.com>,
	tarantool-patches@dev.tarantool.org, imun@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto
Date: Tue, 10 Dec 2019 00:31:22 +0100	[thread overview]
Message-ID: <a8929b96-d644-df4f-7a2b-85f28f254d8c@tarantool.org> (raw)
In-Reply-To: <20191209072140.GD433@atlas>

Hi! Thanks for the review!

Disclaimer: in case something looks 'toxic', this is an
accident, and is not done intentionally.

On 09/12/2019 08:21, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/12/08 23:47]:
> 
> The danger of reporting, self-assigning and fixing a bug is that
> ... it might be not a bug.

I agree. Except when something is obviously a bug which is
clearly the case.

> 
> Users should know that iproto fibers are pooled, not
> created/destroyed on demand. So fiber local storage is simply not
> making any sense for them.

Here I disagree. Users should not know anything about whether
the fibers are pooled, when, and how.

If so, then please, give an example, when such a strange
fiber.storage is needed? I just really can't come up with a
usage case.

I did a public poll to understand what a behaviour is expected,
and not a single person expects, that pooled vs not pooled fiber
would affect its behaviour. Pool is like a cache. It should not
be visible. You literally said it in another thread about SQL
PREPARE.

> 
> A proper fix would be to disable fiber local storage for these
> fibers, not try to make it work.

That would lead to a problem, that functions, using fiber.storage,
would work properly being called from a background fiber, but would
fail being called from an iproto-used fiber. It is clearly not a
fix, but rather a much worse bug, sorry.

> 
> Even though your patch "works", it is pretty much useless.
> 

Well, sorry, with all respect, but I disagree here too. Appeared,
there were repetitive requests to fix this weird behaviour of
fiber.storage a couple of years ago, and again recently, which were
successfully rejected by you and by the same reason, that pooling,
as you think, should be exposed.

My patch fixes that problem, what makes it not useless.

Moreover, that fixes another problem about pooled fibers never
freeing the storages (= leak) and therefore occupying Lua
memory, which is very limited in size. That may become a real
problem, when there are many pooled fibers. Their count may be
thousands, and depends on net_msg_max.

  reply	other threads:[~2019-12-09 23:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08 19:28 [Tarantool-patches] [PATCH 0/2] Fiber storage leak Vladislav Shpilevoy
2019-12-08 19:28 ` [Tarantool-patches] [PATCH 1/2] fiber: unref fiber.storage via global Lua state Vladislav Shpilevoy
2019-12-11 23:57   ` Igor Munkin
2019-12-12  8:50     ` Konstantin Osipov
2019-12-12 23:38     ` Vladislav Shpilevoy
2019-12-13 10:44       ` Igor Munkin
2019-12-08 19:28 ` [Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto Vladislav Shpilevoy
2019-12-09  7:21   ` Konstantin Osipov
2019-12-09 23:31     ` Vladislav Shpilevoy [this message]
2019-12-10  8:21       ` Konstantin Osipov
2019-12-10  8:32   ` Konstantin Osipov
2019-12-10 22:59     ` Vladislav Shpilevoy
2019-12-11  7:08       ` Konstantin Osipov
2019-12-11 21:23         ` Vladislav Shpilevoy
2019-12-12  0:00           ` Igor Munkin
2019-12-12 23:37             ` Vladislav Shpilevoy
2019-12-13 13:35               ` Igor Munkin
2019-12-12  8:46           ` Konstantin Osipov
2019-12-13  0:02             ` Vladislav Shpilevoy
2019-12-13  7:58               ` Konstantin Osipov
2019-12-13 23:11                 ` Vladislav Shpilevoy
2019-12-14 12:26                   ` Konstantin Osipov
2019-12-14 12:30                     ` Konstantin Osipov
2019-12-14 12:33                       ` Konstantin Osipov
2019-12-14 16:49                         ` Vladislav Shpilevoy
2019-12-14 20:59                           ` Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8929b96-d644-df4f-7a2b-85f28f254d8c@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=kostja.osipov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 2/2] fiber: destroy fiber.storage created by iproto' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox