From: Alexander Turenko <alexander.turenko@tarantool.org>
To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v2 1/2] test: tunned timeouts and added statuses checks
Date: Sun, 24 Mar 2019 10:19:34 +0300 [thread overview]
Message-ID: <20190324071934.6pfpaxs6s7bl3xoy@tkn_work_nb> (raw)
In-Reply-To: <6726cdd338a2c24005e72ceec9a6badc072bcdbd.1553148177.git.avtikhon@tarantool.org>
In short: the patch too large to review each individual change (say,
timeouts or wait_cond's).
Also there are changes I doubt about (fast_replica usage for a single
instance creation and fast_replica changes). I see, it was the big
effort, but I don't see gains.
Comments are inlined below.
WBR, Alexander Turenko.
On Thu, Mar 21, 2019 at 09:03:05AM +0300, Alexander V. Tikhonov wrote:
> Tunned timeouts to the common value. Added for status checks the
> the wait_cond loops with diagnostic, changed naming of the tests
> replicas, separated replicas between subtests in tests, changed
> hardcoded replicas creation/deletion to the standalone routine.
Tunned -> tuned. In the commit header too.
> Tunned timeouts to the common value.
How one can review it within this large patch? Need to be factored out
to allow one to look into them.
> Added for status checks the the wait_cond loops with diagnostic.
Ok.
> Changed naming of the tests replicas.
Is it about file names (and test-run instance names)? I think that it
would be better to create one instance.lua or replica.lua (if possible)
and use symlinks. It is not good to duplicate code.
> Separated replicas between subtests in tests.
Is it part of the previous item?
> Changed hardcoded replicas creation/deletion to the standalone
> routine.
It does not become less 'hardcoded' when becomes wrapped. AFAIU, you
wrap 'create server', 'start server' and other test-run's commands into
'fast_replica' even when we start just one server. So complexity of
tests and these wrappes (fast_replica.lua) both were increased. I don't
understand gains of this change.
> @@ -485,26 +481,26 @@ fiber = require('fiber')
> while box.info.replication[1].upstream.status ~= 'follow' do fiber.sleep(0.0001) end
> ---
> ...
> -box.info.replication[1].upstream.status -- follow
> +test_run:wait_cond(function() return box.info.replication[1].upstream.status == 'follow' end) or box.info.replication[1].upstream.status
> ---
> -- follow
> +- true
'while' loop above do the same thing. It should be removed I guess.
> ...
> for i = 0, 15 do fiber.sleep(0.01) if box.info.replication[1].upstream.status ~= 'follow' then break end end
> ---
> ...
> -box.info.replication[1].upstream.status -- follow
> +test_run:wait_cond(function() return box.info.replication[1].upstream.status == 'follow' end) or box.info.replication[1].upstream.status
Same here.
> --- a/test/replication/lua/fast_replica.lua
> +++ b/test/replication/lua/fast_replica.lua
> @@ -1,18 +1,23 @@
>
> -function join(inspector, n)
> - local path = os.getenv('TARANTOOL_SRC_DIR')
> +function create(inspector, name, replica)
> + replica = replica or 'replica'
So now name of an instance file can be arbirtary, but different from
names in a test. It will make investigation of a test fail more complex.
> function unregister(inspector, id)
> - box.space._cluster:delete{id}
> + id = id or 2
I understood that you try to simplify 'one instance' case, but this
default looks really counter-intuitive. I don't think that it worth to
use 'fast_replica' for that case as I wrote above.
> +function hibernate(inspector, name, id)
> + return stop(inspector, name, id) and cleanup(inspector, name, id)
> end
I have to remember now what is create, start, stop and clean. Enough
terms I think.
> -function delete(inspector, id)
> - inspector:cmd('stop server replica'..tostring(id - 1))
> - inspector:cmd('delete server replica'..tostring(id - 1))
> +function prune(inspector, name, id)
> + return unregister(inspector, id) and drop(inspector, name, id)
> +end
Same here.
> diff --git a/test/replication/suite.ini b/test/replication/suite.ini
> index 6e9e3edd0..aa79f68f3 100644
> --- a/test/replication/suite.ini
> +++ b/test/replication/suite.ini
> @@ -7,5 +7,6 @@ release_disabled = catch.test.lua errinj.test.lua gc.test.lua gc_no_space.test.l
> config = suite.cfg
> lua_libs = lua/fast_replica.lua lua/rlimit.lua
> use_unix_sockets = True
> +use_unix_sockets_iproto = True
It is not mentioned in the commit message. And should be factored out
into its own patch.
prev parent reply other threads:[~2019-03-24 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 6:03 [tarantool-patches] " Alexander V. Tikhonov
2019-03-21 6:03 ` [tarantool-patches] [PATCH v2 2/2] test: added loop with restart for fullmesh routine Alexander V. Tikhonov
2019-03-24 5:41 ` [tarantool-patches] " Alexander Turenko
2019-03-24 7:19 ` Alexander Turenko [this message]
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=20190324071934.6pfpaxs6s7bl3xoy@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=avtikhon@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH v2 1/2] test: tunned timeouts and added statuses checks' \
/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