<HTML><BODY><div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div>
<base target="_self" href="https://e.mail.ru/">
<div id="style_15798630921649819822_BODY"><div class="class_1579866626">
<br>Hi! <br>Yes, here is the new patch.<br><br>Change the minimum possible value of the variable vinyl_run_size_ratio to 2. <br> <br> Closes #3346<br> <br> issue: <a href="https://github.com/tarantool/tarantool/issues/3346" rel="noopener" target="_blank" data-mce-href="https://github.com/tarantool/tarantool/issues/3346">https://github.com/tarantool/tarantool/issues/3346</a><br> ---<br> src/box/alter.cc | 4 ++--<br> src/box/box.cc | 4 ++--<br> src/box/vy_range.c | 2 +-<br> test/box-tap/cfg.test.lua | 2 +-<br> test/vinyl/ddl.result | 5 +++--<br> test/vinyl/ddl.test.lua | 2 +-<br> 6 files changed, 10 insertions(+), 9 deletions(-)<br> <br> diff --git a/src/box/alter.cc b/src/box/alter.cc<br> index bef25b605..123e94994 100644<br> --- a/src/box/alter.cc<br> +++ b/src/box/alter.cc<br> @@ -227,10 +227,10 @@ index_opts_decode(struct index_opts *opts, const char *map,<br> "run_count_per_level must be greater than 0");<br> return -1;<br> }<br> - if (opts->run_size_ratio <= 1) {<br> + if (opts->run_size_ratio < 2) {<br> diag_set(ClientError, ER_WRONG_INDEX_OPTIONS,<br> BOX_INDEX_FIELD_OPTS,<br> - "run_size_ratio must be greater than 1");<br> + "run_size_ratio must be greater than or uqual to 2");<br> return -1;<br> }<br> if (opts->bloom_fpr <= 0 || opts->bloom_fpr > 1) {<br> diff --git a/src/box/box.cc b/src/box/box.cc<br> index b119c927b..0f26e28cd 100644<br> --- a/src/box/box.cc<br> +++ b/src/box/box.cc<br> @@ -589,9 +589,9 @@ box_check_vinyl_options(void)<br> tnt_raise(ClientError, ER_CFG, "vinyl_run_count_per_level",<br> "must be greater than 0");<br> }<br> - if (run_size_ratio <= 1) {<br> + if (run_size_ratio < 2) {<br> tnt_raise(ClientError, ER_CFG, "vinyl_run_size_ratio",<br> - "must be greater than 1");<br> + "must be greater than or uqual to 2");<br> }<br> if (bloom_fpr <= 0 || bloom_fpr > 1) {<br> tnt_raise(ClientError, ER_CFG, "vinyl_bloom_fpr",<br> diff --git a/src/box/vy_range.c b/src/box/vy_range.c<br> index 4ff852112..8d6bfd30b 100644<br> --- a/src/box/vy_range.c<br> +++ b/src/box/vy_range.c<br> @@ -289,7 +289,7 @@ vy_range_update_compaction_priority(struct vy_range *range,<br> const struct index_opts *opts)<br> {<br> assert(opts->run_count_per_level > 0);<br> - assert(opts->run_size_ratio > 1);<br> + assert(opts->run_size_ratio >= 2);<br> <br> range->compaction_priority = 0;<br> vy_disk_stmt_counter_reset(&range->compaction_queue);<br> diff --git a/test/box-tap/cfg.test.lua b/test/box-tap/cfg.test.lua<br> index d529447bb..b68c6f17b 100755<br> --- a/test/box-tap/cfg.test.lua<br> +++ b/test/box-tap/cfg.test.lua<br> @@ -46,7 +46,7 @@ invalid('vinyl_read_threads', 0)<br> invalid('vinyl_write_threads', 1)<br> invalid('vinyl_page_size', 0)<br> invalid('vinyl_run_count_per_level', 0)<br> -invalid('vinyl_run_size_ratio', 1)<br> +invalid('vinyl_run_size_ratio', 1.9)<br> invalid('vinyl_bloom_fpr', 0)<br> invalid('vinyl_bloom_fpr', 1.1)<br> <br> diff --git a/test/vinyl/ddl.result b/test/vinyl/ddl.result<br> index 9c453a007..a97e415be 100644<br> --- a/test/vinyl/ddl.result<br> +++ b/test/vinyl/ddl.result<br> @@ -23,9 +23,10 @@ space:create_index('pk', {run_count_per_level = 0})<br> - error: 'Wrong index options (field 4): run_count_per_level must be greater than<br> 0'<br> ...<br> -space:create_index('pk', {run_size_ratio = 1})<br> +space:create_index('pk', {run_size_ratio = 1.9})<br> ---<br> -- error: 'Wrong index options (field 4): run_size_ratio must be greater than 1'<br> +- error: 'Wrong index options (field 4): run_size_ratio must be greater than or uqual<br> + to 2'<br> ...<br> space:create_index('pk', {bloom_fpr = 0})<br> ---<br> diff --git a/test/vinyl/ddl.test.lua b/test/vinyl/ddl.test.lua<br> index 010ec6d79..35e37a84f 100644<br> --- a/test/vinyl/ddl.test.lua<br> +++ b/test/vinyl/ddl.test.lua<br> @@ -6,7 +6,7 @@ space = box.schema.space.create('test', {engine = 'vinyl' })<br> space:create_index('pk', {page_size = 0})<br> space:create_index('pk', {page_size = 8192, range_size = 4096})<br> space:create_index('pk', {run_count_per_level = 0})<br> -space:create_index('pk', {run_size_ratio = 1})<br> +space:create_index('pk', {run_size_ratio = 1.9})<br> space:create_index('pk', {bloom_fpr = 0})<br> space:create_index('pk', {bloom_fpr = 1.1})<br> space:drop()<br> -- <br> 2.17.1<br><br><blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px;">
Среда, 15 января 2020, 20:36 +03:00 от Nikita Pettik <<a href="mailto:korablev@tarantool.org">korablev@tarantool.org</a>>:<br>
<br>
<div id="">
<div class="js-helper_mailru_css_attribute_postfix js-readmsg-msg_mailru_css_attribute_postfix">
<style></style>
<div>
<div id="style_15791097791096472238_BODY_mailru_css_attribute_postfix">On 13 Jan 12:48, Maxim Kulis wrote:<br>
> Hi! <br>
> Thanks for your review. <br>
> <br>
<br>
Hi,<br>
<br>
Are you going to update your patch according to the review notes?<br>
Review process is described here:<br>
<a href="https://www.tarantool.io/en/doc/2.2/dev_guide/developer_guidelines/#how-to-submit-a-patch-for-review" target="_blank" rel=" noopener noreferrer">https://www.tarantool.io/en/doc/2.2/dev_guide/developer_guidelines/#how-to-submit-a-patch-for-review</a><br>
<br>
> >Четверг, 5 декабря 2019, 14:27 +03:00 от Nikita Pettik <<a href="//e.mail.ru/compose/?mailto=mailto%3akorablev@tarantool.org" target="_blank" rel=" noopener noreferrer">korablev@tarantool.org</a>>:<br>
> ><br>
> >On 02 Dec 19:11, Maksim Kulis wrote:<br>
> >> Change the minimum possible value of the variable vinyl_run_size_ratio to 2.<br>
> >> <br>
> >> Closes #3346<br>
> >> ---<br>
> >> src/box/box.cc | 4 ++--<br>
> >> test/box-tap/cfg.test.lua | 2 +-<br>
> >> 2 files changed, 3 insertions(+), 3 deletions(-)<br>
> ><br>
> >Hello. Thanks for the patch.<br>
> ><br>
> >Firsly, please update check of run_size_ratio during index options<br>
> >decode (see index_opts_decode()).<br>
> ><br>
> >I would also update assert() in vy_range_update_compaction_priority():<br>
> >let's make it check that run_size_ratio always >= 2.<br>
> ><br>
> >Finally, I would add brief explanation to the commit message why<br>
> >run_size_ratio less than 2 is meaningless (for those who are not<br>
> >familiar with vinyl inner organization).<br>
> > <br>
> >> diff --git a/src/box/box.cc b/src/box/box.cc<br>
> >> index be2390335..e426fdab8 100644<br>
> >> --- a/src/box/box.cc<br>
> >> +++ b/src/box/box.cc<br>
> >> @@ -589,9 +589,9 @@ box_check_vinyl_options(void)<br>
> >> tnt_raise(ClientError, ER_CFG, "vinyl_run_count_per_level",<br>
> >> "must be greater than 0");<br>
> >> }<br>
> >> - if (run_size_ratio <= 1) {<br>
> >> + if (run_size_ratio < 2) {<br>
> >> tnt_raise(ClientError, ER_CFG, "vinyl_run_size_ratio",<br>
> >> - "must be greater than 1");<br>
> >> + "must be greater than or uqual to 2");<br>
> >> }<br>
> >> if (bloom_fpr <= 0 || bloom_fpr > 1) {<br>
> >> tnt_raise(ClientError, ER_CFG, "vinyl_bloom_fpr",<br>
> >> diff --git a/test/box-tap/cfg.test.lua b/test/box-tap/cfg.test.lua<br>
> >> index d529447bb..b68c6f17b 100755<br>
> >> --- a/test/box-tap/cfg.test.lua<br>
> >> +++ b/test/box-tap/cfg.test.lua<br>
> >> @@ -46,7 +46,7 @@ invalid('vinyl_read_threads', 0)<br>
> >> invalid('vinyl_write_threads', 1)<br>
> >> invalid('vinyl_page_size', 0)<br>
> >> invalid('vinyl_run_count_per_level', 0)<br>
> >> -invalid('vinyl_run_size_ratio', 1)<br>
> >> +invalid('vinyl_run_size_ratio', 1.9)<br>
> >> invalid('vinyl_bloom_fpr', 0)<br>
> >> invalid('vinyl_bloom_fpr', 1.1)<br>
> >> <br>
> >> -- <br>
> >> 2.17.1<br>
> >> <br>
> <br>
> <br>
> -- <br>
> Maxim Kulis<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>-- <br>Maxim Kulis<br>
</div></div>
<base target="_self" href="https://e.mail.ru/">
</div>
</div></BODY></HTML>