From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 8 Dec 2018 01:21:57 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] Re: [PATCH 3/4] session: introduce 'dead' type Message-ID: <20181207222157.GA2217@chai> References: <20181207173856.GE840@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org, vdavydov.dev@gmail.com List-ID: * Vladislav Shpilevoy [18/12/08 01:20]: > On 07/12/2018 20:38, Konstantin Osipov wrote: > > * Vladislav Shpilevoy [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? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov