From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org, vdavydov.dev@gmail.com
Subject: Re: [tarantool-patches] Re: [PATCH 3/4] session: introduce 'dead' type
Date: Sat, 8 Dec 2018 01:42:49 +0300 [thread overview]
Message-ID: <f4d8213f-8ec5-5f5f-58e1-f924c44225ee@tarantool.org> (raw)
In-Reply-To: <20181207222157.GA2217@chai>
On 08/12/2018 01:21, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [18/12/08 01:20]:
>> On 07/12/2018 20:38, Konstantin Osipov wrote:
>>> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [18/12/07 18:48]:
>>>> If an iproto connection is closed, there are no way
>>>> how to determine if this happened. Except setting an
>>>> on_disconnect trigger which sets a global flag or
>>>> something.
>>>>
>>>> To deal with such orphan requests a new session type
>>>> is introduced that can be checked inside a request.
>>>
>>> Please don't reset session type when it becomes dead.
>>> What's the problem with storing an explicit vtab pointer in the
>>> session and resetting it?
>>
>> I've explained to you what is a problem. To store vtab in struct
>> session we should reset its type never, since vtab now depends
>> both on type and on session state. But we can not do it because of
>> repl and console session types which are reset in src/lua/init.c and
>> src/lua/console.lua. Moreover, we can not set a session type repl
>> at start of the lua script runner, since it is in src/ but session
>> is in box/.
>
> What's wrong with adding a method session_set_type() which would
> reset both type and vtab?
>
I will try to implement it. But as I remember you were against it
yesterday:
Константин Осипов, [6 дек. 2018 г., 23:24:43]:
мне кажется проблема в другом
в том что я разрешаю ресетить type
эту проблему можно порешать, да
я согласен что переустановка типа сессии после её создания ломает инкапсуляцию.
Vladislav Shpilevoy, [6 дек. 2018 г., 23:25:23]:
я ее порешал, удалив repl. Теперь lbox_session_create всегда создает консоль
Константин Осипов, [6 дек. 2018 г., 23:25:23]:
это говнокод какой-то
Vladislav Shpilevoy, [6 дек. 2018 г., 23:26:03]:
если не удалять репл, то придется херачить что-то вроде session_set_type, причем надо будет запрещать конвертации несовместимых сессий
Константин Осипов, [6 дек. 2018 г., 23:26:12]:
воу воу
нахер вообще нужен lbox_session_create?
Nonetheless, as you wish.
next prev parent reply other threads:[~2018-12-07 22:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 15:46 [PATCH 0/4] Outdate disconnected session Vladislav Shpilevoy
2018-12-07 15:46 ` [PATCH 1/4] iproto: rename disconnect cmsg to destroy Vladislav Shpilevoy
2018-12-07 17:36 ` [tarantool-patches] " Konstantin Osipov
2018-12-11 12:54 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-07 15:46 ` [PATCH 2/4] iproto: fire on_disconnect right after disconnect Vladislav Shpilevoy
2018-12-07 17:37 ` [tarantool-patches] " Konstantin Osipov
2018-12-11 12:55 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-07 15:46 ` [PATCH 3/4] session: introduce 'dead' type Vladislav Shpilevoy
2018-12-07 17:38 ` [tarantool-patches] " Konstantin Osipov
2018-12-07 20:40 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-07 22:21 ` Konstantin Osipov
2018-12-07 22:42 ` Vladislav Shpilevoy [this message]
2018-12-07 15:46 ` [PATCH 4/4] session: kill a session of a closed connection Vladislav Shpilevoy
2018-12-07 17:35 ` [tarantool-patches] [PATCH 0/4] Outdate disconnected session Konstantin Osipov
2018-12-11 16:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-12-07 17:41 ` [tarantool-patches] " Konstantin Osipov
2018-12-11 16:13 ` [tarantool-patches] " 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=f4d8213f-8ec5-5f5f-58e1-f924c44225ee@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH 3/4] session: introduce '\''dead'\'' type' \
/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