From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Mergen Imeev <imeevma@tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview
Date: Wed, 27 Nov 2019 14:37:41 +0300 [thread overview]
Message-ID: <20191127113741.GC9233@atlas> (raw)
In-Reply-To: <20191127111826.GA16940@tarantool.org>
* Mergen Imeev <imeevma@tarantool.org> [19/11/27 14:22]:
> > Where do you get the value from to build the tuple?
> >
> I get it from current_session()->sql_flags and
> current_session()->sql_default_engine.
OK, so my point is that they were put there as a historical
artefact of sqlite conversion. It seemed then as the most logical
place to put them. PRAGMAs were internal, so it was not a big
deal.
But going forward it's a dangerous place to store them, they should be
global - it fattens the session object, and if there are more
settings like these, there will be semantics issues.
Besides, there will be a need for global counterpart anyway - since the
next logical question is how to reset the session defaults?
I.e. I want all new sessions to get created with
sql_default_engine = vinyl, how do I do it?
Does my point make sense now?
> I think that the system view state is the same for all
> sessions. It is empty, it has the same methods. However, it
> can give different results, because when it gives tuples,
> it reads from the session state (current_session()) to
> create them.
This is a neat implementation, I agree.
--
Konstantin Osipov, Moscow, Russia
next prev parent reply other threads:[~2019-11-27 11:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-23 12:11 [Tarantool-patches] [PATCH v4 0/2] " imeevma
2019-11-23 12:11 ` [Tarantool-patches] [PATCH v4 1/2] sysview: make get() and create_iterator() methods virtual imeevma
2019-11-23 12:12 ` [Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview imeevma
2019-11-24 15:27 ` Vladislav Shpilevoy
2019-11-27 9:53 ` Mergen Imeev
2019-11-27 23:14 ` Vladislav Shpilevoy
2019-11-26 21:12 ` Konstantin Osipov
2019-11-27 5:15 ` Kirill Yukhin
2019-11-27 10:34 ` Konstantin Osipov
2019-11-27 10:52 ` Mergen Imeev
2019-11-27 11:05 ` Konstantin Osipov
2019-11-27 11:18 ` Mergen Imeev
2019-11-27 11:37 ` Konstantin Osipov [this message]
2019-11-27 12:12 ` Mergen Imeev
2019-11-28 8:46 [Tarantool-patches] [PATCH v4 0/2] Introduce " imeevma
2019-11-28 8:46 ` [Tarantool-patches] [PATCH v4 2/2] box: introduce " imeevma
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=20191127113741.GC9233@atlas \
--to=kostja.osipov@gmail.com \
--cc=imeevma@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v4 2/2] box: introduce _vsession_settings sysview' \
/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