Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Nikita Pettik <korablev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] vinyl: account statement statistics during .index rebuild
Date: Thu, 26 Nov 2020 22:30:05 +0100	[thread overview]
Message-ID: <d5da09ec-9fb2-9297-100b-92802093cf20@tarantool.org> (raw)
In-Reply-To: <20201126211929.GA30305@tarantool.org>

>>>  src/box/vy_run.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/src/box/vy_run.c b/src/box/vy_run.c
>>> index b9822dc3e..820a6ce3f 100644
>>> --- a/src/box/vy_run.c
>>> +++ b/src/box/vy_run.c
>>> @@ -2452,6 +2452,8 @@ vy_run_rebuild_index(struct vy_run *run, const char *dir,
>>>  					goto close_err;
>>>  				}
>>>  			}
>>> +			vy_stmt_stat_acct(&run->info.stmt_stat,
>>> +					  vy_stmt_type(tuple));
>>
>> Why is it needed? The run is not created from the scratch. Only
>> its index is rebuilt, which is not related to the statistics,
>> AFAIU. The statements in the run are not changed here. It means
>> it was filled some time ago, and everything should have already
>> been accounted via vy_run_writer_write_to_page().
> 
> Possibly it doesn't affect anything, but just noted that in case
> of re-creating .index files during force-recovery, they contained
> zeroed statistics (in contrast to ordinary .index files). It may
> turn out to be helpful e.g. during digging into vinyl problems.

No, my question was not about it. I don't understand, why info.stmt_stat
is not already filled? It seems it is based entirely on run file
content, not on its index. It means, you should have it filled when
run is created/recovered.

When is the stat filled when run is recovered normally?

Why does not vy_run_recover() fill the statistics instead?

      reply	other threads:[~2020-11-26 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 21:03 Nikita Pettik
2020-11-26 20:45 ` Vladislav Shpilevoy
2020-11-26 21:19   ` Nikita Pettik
2020-11-26 21:30     ` Vladislav Shpilevoy [this message]

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=d5da09ec-9fb2-9297-100b-92802093cf20@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] vinyl: account statement statistics during .index rebuild' \
    /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