Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 3/4] box: provide a user friendly frontend for accessing session settings
Date: Tue, 17 Mar 2020 14:27:59 +0000	[thread overview]
Message-ID: <20200317142759.GC3221@tarantool.org> (raw)
In-Reply-To: <10819f60-76f1-988c-79be-eb70c2667af5@tarantool.org>

On 16 Mar 23:53, Vladislav Shpilevoy wrote:
> On 16/03/2020 17:08, Nikita Pettik wrote:
> > On 17 Feb 15:12, Chris Sosnin wrote:
> >> - space_object:update() is hard to use for configuring session settings,
> >> so we provide box.session.setting table, which can be used in a much more
> >> native way.
> >>
> >> - Prior to this patch sql settings were not accessible before box.cfg()
> >> call, even though these flags can be set right after session creation.
> >>
> >> Part of #4711
> >> ---
> > 
> > tarantool> box.session.settings.sql_vdbe_debug
> > ---
> > - false
> > ...
> > 
> > tarantool> box.session.settings.sql_vdbe_debug = true
> > ---
> > ...
> > 
> > tarantool> box.session.settings.sql_vdbe_debug
> > ---
> > - true
> > ...
> 
> Yeah, we can ban this. To avoid confusion.
> 
> > 
> > tarantool> box.execute("select 1")
> > ---
> > - metadata:
> >   - name: '1'
> >     type: integer
> >   rows:
> >   - [1]
> > ...
> > 
> > Looks inconsistent. Can we use instead of :set() method simple
> > table value assignment? Otherwise accessing row table values
> 
> Assignment would require not to store settings in box.session.settings,
> to be able to redefine __newindex metamethod. If we don't store them, we
> kill autocompletion, which was asked explicitly by somebody.
> 
> But I am on your side here - I don't think autocompletion worth this
> complication. Who wants to look at existing settings can just print
> box.sessions.settings table.
> 
> > should be disallowed. Same concerns :get() method. Why ever
> > anyone should bother with :get() when one can access table value
> > via simple indexing?
> 
> Hm. But there is no :get() method. We didn't implement getting, because
> no one asked for this.

As far as I remember no one either asked for :set() method (except for me) :)

> And indeed, usually you just set settings, without
> checking if set really worked. I was thinking we could introduce get if
> someone asks for that. But up to you. Can be added now as well.

I do not insist since do not consider this to be prio1 task (as well
as any other issue connected with settings machinery).

  reply	other threads:[~2020-03-17 14:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 12:12 [Tarantool-patches] [PATCH 0/4] box: session settings fixes Chris Sosnin
2020-02-17 12:12 ` [Tarantool-patches] [PATCH 1/4] box: replace session_settings modules with a single array Chris Sosnin
2020-02-17 12:12 ` [Tarantool-patches] [PATCH 2/4] box: add binary search for _session_settings space Chris Sosnin
2020-03-16 14:16   ` Nikita Pettik
2020-03-16 22:53     ` Vladislav Shpilevoy
2020-03-17 17:24       ` Nikita Pettik
2020-02-17 12:12 ` [Tarantool-patches] [PATCH 3/4] box: provide a user friendly frontend for accessing session settings Chris Sosnin
2020-03-16 16:08   ` Nikita Pettik
2020-03-16 22:53     ` Vladislav Shpilevoy
2020-03-17 14:27       ` Nikita Pettik [this message]
2020-03-17 14:36         ` Chris Sosnin
2020-02-17 12:12 ` [Tarantool-patches] [PATCH 4/4] sql: " Chris Sosnin
2020-03-16 17:02   ` Nikita Pettik
2020-03-16 22:53     ` Vladislav Shpilevoy
2020-03-17 17:26     ` Chris Sosnin
2020-03-17 20:12       ` Nikita Pettik
2020-03-17 21:00         ` Chris Sosnin
2020-03-18 10:00         ` Chris Sosnin
  -- strict thread matches above, loose matches on Subject: below --
2020-03-30  9:13 [Tarantool-patches] [PATCH 0/4] session settings fixes Chris Sosnin
2020-03-30  9:13 ` [Tarantool-patches] [PATCH 3/4] box: provide a user friendly frontend for accessing session settings Chris Sosnin
2020-04-03 14:47   ` Nikita Pettik
2020-02-03 22:17 [Tarantool-patches] [PATCH v4 3/3] " Vladislav Shpilevoy
2020-02-04 19:31 ` [Tarantool-patches] [PATCH 3/4] " Chris Sosnin
2020-02-06 22:15   ` 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=20200317142759.GC3221@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 3/4] box: provide a user friendly frontend for accessing session settings' \
    /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