Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Maria Khaydich <maria.khaydich@tarantool.org>,
	Nikita Pettik <korablev@tarantool.org>
Cc: tarantool-patches <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] box: sql prepare and execute statistics should be reflected in box.stat()
Date: Tue, 3 Mar 2020 23:39:54 +0100	[thread overview]
Message-ID: <2f34a430-731d-069a-8856-8cdbc30e77ab@tarantool.org> (raw)
In-Reply-To: <1583253766.42635729@f106.i.mail.ru>

Thanks for the patch!

See 2 comments below.

> Calling prepare and execute did not update corresponding request statistics
> in the box.stat table. This happened because methods that collect stats were
> never called where they should have been.

1. I don't think we can make this commit have the same commit message
as the original commit (even with an amendment below). And it should not
be 'Closes'. This is rather 'Follow-up'.

> There was a bug in previous commit resulting in collecting statistics on
> box.execute twice in some cases.
>  
> Closes #4756
> ---
> Issue:
> https://github.com/tarantool/tarantool/issues/4756
> Branch:
> https://github.com/tarantool/tarantool/tree/eljashm/gh-4756-hotfix-box-stat-execute-prepare 
> > diff --git a/test/sql/iproto.result b/test/sql/iproto.result
> index a391307d1..0e046577d 100644
> --- a/test/sql/iproto.result
> +++ b/test/sql/iproto.result
> @@ -800,22 +800,22 @@ e = box.stat().EXECUTE.total
>  s = box.prepare([[ SELECT ?; ]])
>  ---
>  ...
> -s:execute({42})
> +res, err = box.unprepare(s)
>  ---
> -- metadata:
> -  - name: '?'
> -    type: integer
> -  rows:
> -  - [42]
>  ...
> -res, err = box.unprepare(s)
> +box.execute('create table test (id integer primary key, a integer)')
>  ---
> +- row_count: 1
> +...
> +box.execute('DROP TABLE test')

2. Is it important to call DDL? Would 'box.execute('SELECT 1;')' be
enough?

  reply	other threads:[~2020-03-03 22:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 18:35 Maria Khaydich
2020-02-10 23:06 ` Nikita Pettik
2020-02-13 21:44 ` Vladislav Shpilevoy
2020-02-19 16:37   ` Maria Khaydich
2020-02-19 17:16     ` Nikita Pettik
2020-02-25 11:08       ` Maria Khaydich
2020-02-25 13:02         ` Nikita Pettik
2020-02-25 20:29           ` Vladislav Shpilevoy
2020-02-26 15:50             ` Maria Khaydich
2020-02-27  0:08               ` Vladislav Shpilevoy
2020-02-27 13:21                 ` Nikita Pettik
2020-03-03 16:42                   ` Maria Khaydich
2020-03-03 22:39                     ` Vladislav Shpilevoy [this message]
2020-03-06 11:34                       ` Maria Khaydich
2020-03-06 14:32                         ` Nikita Pettik
2020-03-06 15:09                           ` Nikita Pettik
2020-03-04 13:47                     ` Nikita Pettik
2020-02-25 22:26 ` Kirill Yukhin
2020-02-25 23:30   ` Nikita Pettik

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=2f34a430-731d-069a-8856-8cdbc30e77ab@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=maria.khaydich@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] box: sql prepare and execute statistics should be reflected in box.stat()' \
    /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