Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Yaroslav Dynnikov <yaroslav.dynnikov@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH 2/2] vshard: fix buckets_count() on replicas
Date: Fri, 21 May 2021 21:30:34 +0200	[thread overview]
Message-ID: <ed19e7ce-00ee-1df2-cc39-b9d0f5320aee@tarantool.org> (raw)
In-Reply-To: <CAK0MaD3mm52X0cOFaJoT3vaGPhx-hOc_C8H21r7WOx9f7hEmgA@mail.gmail.com>

Thanks for the review!

>     diff --git a/test/misc/reconfigure.result b/test/misc/reconfigure.result
>     index 3b34841..a03ab5a 100644
>     --- a/test/misc/reconfigure.result
>     +++ b/test/misc/reconfigure.result
>     @@ -271,9 +271,9 @@ box.cfg.read_only
>      ---
>      - false
>      ...
>     -#box.space._bucket:on_replace()
>     +assert(#box.space._bucket:on_replace() == 1)
>      ---
>     -- 1
>     +- true
>      ...
> 
> 
> Why is this change necessary? Seems now you miss an actual value in case the test fails.
> This question applies to many cases below.

See me response in the first email about the assertions.

> No matter what testing framework is used, I think that
> 
> assert_equals(value, 1) -- assertion failed: expected 1, got 2
> 
> is better (more helpful) than eager
> 
> assert(value == 1) -- assertion failed
Yes, but what you are describing is present in the tap tests
framework. Which currently is hardly usable for complex multi-instance
tests. Hence I use what is available. Decided not to implement my
own testing suite for these checks as it is anyway trivial to
get more info if they start failing.

Until tap would be easier to use for multi-instance tests.

>     @@ -2612,17 +2676,15 @@ local function storage_cfg(cfg, this_replica_uuid, is_reload)
>          local uri = luri.parse(this_replica.uri)
>          schema_upgrade(is_master, uri.login, uri.password)
> 
>     -    if M.bucket_on_replace then
>     -        box.space._bucket:on_replace(nil, M.bucket_on_replace)
>     -        M.bucket_on_replace = nil
>     -    end
>     -    lref.cfg()
>     -    if is_master then
>     -        box.space._bucket:on_replace(bucket_generation_increment)
>     -        M.bucket_on_replace = bucket_generation_increment
>     +    if is_master or box.space._bucket then
>     +        schema_install_triggers()
> 
> 
> +1 to Oleg, isn't _bucket check enough?

I want to emphasize that on the master the bootstrap is finished anyway,
because it performs the bootstrap. On the master no need to check for
_bucket nor wait for the schema anyhow.

  reply	other threads:[~2021-05-21 19:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 11:07 [Tarantool-patches] [PATCH 0/2] vshard.storage.buckets_count() bug Vladislav Shpilevoy via Tarantool-patches
2021-05-13 11:07 ` [Tarantool-patches] [PATCH 1/2] test: fix test output on latest Tarantool Vladislav Shpilevoy via Tarantool-patches
2021-05-13 20:23   ` Oleg Babin via Tarantool-patches
2021-05-19 21:50   ` Yaroslav Dynnikov via Tarantool-patches
2021-05-21 19:26     ` Vladislav Shpilevoy via Tarantool-patches
2021-05-21 21:54       ` Yaroslav Dynnikov via Tarantool-patches
2021-05-13 11:07 ` [Tarantool-patches] [PATCH 2/2] vshard: fix buckets_count() on replicas Vladislav Shpilevoy via Tarantool-patches
2021-05-13 20:23   ` Oleg Babin via Tarantool-patches
2021-05-21 19:26     ` Vladislav Shpilevoy via Tarantool-patches
2021-05-24  6:57       ` Oleg Babin via Tarantool-patches
2021-05-19 21:51   ` Yaroslav Dynnikov via Tarantool-patches
2021-05-21 19:30     ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-05-13 20:23 ` [Tarantool-patches] [PATCH 0/2] vshard.storage.buckets_count() bug Oleg Babin via Tarantool-patches
2021-05-25 20:43 ` Vladislav Shpilevoy via Tarantool-patches

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=ed19e7ce-00ee-1df2-cc39-b9d0f5320aee@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --cc=yaroslav.dynnikov@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 2/2] vshard: fix buckets_count() on replicas' \
    /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