[Tarantool-patches] [PATCH] vinyl: account statement statistics during .index rebuild
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Nov 26 23:45:30 MSK 2020
Hi! Thanks for the patch!
On 24.11.2020 22:03, Nikita Pettik wrote:
> It may turn out to be necessary to re-create .index file corresponding
> to .run file. During rebuild it was forgotten to account statement
> statistics, i.e. count of INSERTs, DELETEs etc. Let's fix it and patch
> vy_run_rebuild_index().
> ---
> Branch:
> https://github.com/tarantool/tarantool/tree/np/vy-account-stmt-stat-on-index-rebuild
> N.B. problem is obvious and trivial to fix. However, test for it is likely
> to be way more sophisticated, so I haven't included it (but checked manually
> that everything works fine).
How can I validate it manually?
> 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().
More information about the Tarantool-patches
mailing list