Tarantool development patches archive
 help / color / mirror / Atom feed
From: Oleg Babin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH vshard 1/5] router: backoff on some box errors
Date: Sat, 18 Dec 2021 16:57:57 +0300	[thread overview]
Message-ID: <9b2851f1-dee5-a5b7-9e43-28687d155543@tarantool.org> (raw)
In-Reply-To: <c2cb4967-caf5-0851-628a-958397e20e14@tarantool.org>

Thanks for your fixes. Yes, it is that I meant. LGTM.

On 18.12.2021 02:10, Vladislav Shpilevoy wrote:
> Hi! Thanks for the review!
>
> On 17.12.2021 12:09, Oleg Babin wrote:
>> Thanks for your patch! LGTM. But I think tests should be extended a bit.
>>
>> I see that tests cover AccessDenied error but I don't see that there is simple error()/assert() error check.
> I hope you meant this:
>
> ====================
> diff --git a/test/router/router2.result b/test/router/router2.result
> index a501dbf..85d077a 100644
> --- a/test/router/router2.result
> +++ b/test/router/router2.result
> @@ -548,6 +548,28 @@ vshard.storage.call = old_storage_call
>    | ---
>    | ...
>   
> +--
> +-- Fails without backoff for other errors.
> +--
> +test_run:switch('router_1')
> + | ---
> + | - true
> + | ...
> +fiber.sleep(vshard.consts.REPLICA_BACKOFF_INTERVAL)
> + | ---
> + | ...
> +rs = vshard.router.route(1)
> + | ---
> + | ...
> +ok, err = rs:callro('vshard.storage.call', {1, 'badmode', 'echo', {100}},       \
> +                    long_timeout)
> + | ---
> + | ...
> +assert(not ok and err.message:match('Unknown mode') ~= nil)
> + | ---
> + | - true
> + | ...
> +
>   _ = test_run:switch("default")
>    | ---
>    | ...
> diff --git a/test/router/router2.test.lua b/test/router/router2.test.lua
> index fb0c3b2..a2171fa 100644
> --- a/test/router/router2.test.lua
> +++ b/test/router/router2.test.lua
> @@ -216,6 +216,16 @@ test_run:switch('storage_2_a')
>   assert(echo_count == 0)
>   vshard.storage.call = old_storage_call
>   
> +--
> +-- Fails without backoff for other errors.
> +--
> +test_run:switch('router_1')
> +fiber.sleep(vshard.consts.REPLICA_BACKOFF_INTERVAL)
> +rs = vshard.router.route(1)
> +ok, err = rs:callro('vshard.storage.call', {1, 'badmode', 'echo', {100}},       \
> +                    long_timeout)
> +assert(not ok and err.message:match('Unknown mode') ~= nil)
> +
>   _ = test_run:switch("default")
>   _ = test_run:cmd("stop server router_1")
>   _ = test_run:cmd("cleanup server router_1")

  reply	other threads:[~2021-12-18 13:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  0:25 [Tarantool-patches] [PATCH vshard 0/5] Router backoff, storage disable Vladislav Shpilevoy via Tarantool-patches
2021-12-17  0:25 ` [Tarantool-patches] [PATCH vshard 1/5] router: backoff on some box errors Vladislav Shpilevoy via Tarantool-patches
2021-12-17 11:09   ` Oleg Babin via Tarantool-patches
2021-12-17 23:10     ` Vladislav Shpilevoy via Tarantool-patches
2021-12-18 13:57       ` Oleg Babin via Tarantool-patches [this message]
2021-12-17  0:25 ` [Tarantool-patches] [PATCH vshard 2/5] storage: auto enable/disable Vladislav Shpilevoy via Tarantool-patches
2021-12-17 11:09   ` Oleg Babin via Tarantool-patches
2021-12-17 23:10     ` Vladislav Shpilevoy via Tarantool-patches
2021-12-18 13:58       ` Oleg Babin via Tarantool-patches
2021-12-17  0:25 ` [Tarantool-patches] [PATCH vshard 3/5] storage: manual enable/disable Vladislav Shpilevoy via Tarantool-patches
2021-12-17 11:09   ` Oleg Babin via Tarantool-patches
2021-12-17  0:25 ` [Tarantool-patches] [PATCH vshard 4/5] error: introduce from_string Vladislav Shpilevoy via Tarantool-patches
2021-12-17 11:09   ` Oleg Babin via Tarantool-patches
2021-12-17 23:10     ` Vladislav Shpilevoy via Tarantool-patches
2021-12-17  0:25 ` [Tarantool-patches] [PATCH vshard 5/5] router: backoff on storage being disabled Vladislav Shpilevoy via Tarantool-patches
2021-12-17 11:09   ` Oleg Babin via Tarantool-patches
2021-12-18 13:58 ` [Tarantool-patches] [PATCH vshard 0/5] Router backoff, storage disable Oleg Babin via Tarantool-patches
2021-12-20 23:52 ` 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=9b2851f1-dee5-a5b7-9e43-28687d155543@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH vshard 1/5] router: backoff on some box errors' \
    /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