From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Cc: v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH] vinyl: account statement statistics during .index rebuild
Date: Wed, 25 Nov 2020 00:03:11 +0300 [thread overview]
Message-ID: <073615333a88cf9ccf217ad90b121cd5074eddd9.1606251521.git.korablev@tarantool.org> (raw)
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).
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));
key = vy_stmt_is_key(tuple) ? tuple_data(tuple) :
tuple_extract_key(tuple, cmp_def,
MULTIKEY_NONE, NULL);
--
2.17.1
next reply other threads:[~2020-11-24 21:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 21:03 Nikita Pettik [this message]
2020-11-26 20:45 ` Vladislav Shpilevoy
2020-11-26 21:19 ` Nikita Pettik
2020-11-26 21:30 ` 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=073615333a88cf9ccf217ad90b121cd5074eddd9.1606251521.git.korablev@tarantool.org \
--to=korablev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@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