From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (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 DEC5D46970F for ; Wed, 27 Nov 2019 14:05:06 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id n21so23942311ljg.12 for ; Wed, 27 Nov 2019 03:05:06 -0800 (PST) Date: Wed, 27 Nov 2019 14:05:05 +0300 From: Konstantin Osipov Message-ID: <20191127110505.GA9233@atlas> References: <84ae817b52e0d9415a0b89c730792b1e0221ff24.1574510839.git.imeevma@gmail.com> <20191126211234.GF23422@atlas> <20191127051523.qm3mjvng4pnqoe4y@tarantool.org> <20191127105206.GA16682@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191127105206.GA16682@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mergen Imeev Cc: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org * Mergen Imeev [19/11/27 13:56]: > Hi! Thanks for the review. However, I think you are a little > wrong. We do not save these settings anywhere except for the > struct session. When a user reads from the space, it creates > tuples on the fly and passes them to the user. All of this can > actually be read from the commit-message: > > > box: introduce _vsession_settings sysview > > This patch creates the _vsession_settings sysview. This sysview > contains names and values of the session settings. > > This sysview creates tuples on the fly using its own get() and > create_iterator() methods. This allows us to get a tuple without > having to save it anywhere. But this means that every time we get > a tuple from this system view, it is a new tuple, even if they > look the same: > > tarantool> v = box.space._vsession_settings > tarantool> v:get({'sql_default_engine'}) ~= v:get({'sql_default_engine'}) > --- > - true > ... > > Currently, only SQL settings can be extracted from this sysview, > since the only session settings are SQL settings. Where do you get the value from to build the tuple? Where is it stored? If it is stored per-session, I mean struct-session, then my comment is still valid. I'm not challenging the implementation details (I did not read the patch indeed), I am challenging the semantics. The view is called _vsession_settings, so I assume its state (semantically) is local to each database connection, to which I objected. -- Konstantin Osipov, Moscow, Russia