[Tarantool-patches] [PATCH v1 1/1] schema: remove assert on wrong insert into _priv
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Sep 8 00:59:58 MSK 2021
Hi! Thanks for the patch!
See 4 comments below.
On 06.09.2021 10:11, imeevma at tarantool.org wrote:
> Prior to this patch, an assertion was throwed if a tuple with an
1. throwed -> thrown.
> incorrect id was inserted into the _priv system space. This bug
> appeared only in the debug build.
>
> Closes #6295
> ---
> https://github.com/tarantool/tarantool/issues/6295
> https://github.com/tarantool/tarantool/tree/imeevma/gh-6295-assert-on-insert-with-wrong-id
2. Could you please add a changelog?
> diff --git a/test/box-tap/gh-6295-assert-on-wrong-id.test.lua b/test/box-tap/gh-6295-assert-on-wrong-id.test.lua
> new file mode 100755
> index 000000000..e4822f395
> --- /dev/null
> +++ b/test/box-tap/gh-6295-assert-on-wrong-id.test.lua
> @@ -0,0 +1,34 @@
> +#!/usr/bin/env tarantool
> +
> +local tap = require('tap')
> +local test = tap.test('gh-6295-assert-on-wrong-id')
> +
> +test:plan(5)
> +
> +local ok, res
> +
> +box.cfg{}
> +
> +-- Should be an error, not an assertion.
> +local _priv = box.space._priv
> +local errmsg = "Function '1000000' does not exist"
> +ok, res = pcall(_priv.replace, _priv, {1, 2, 'function', 1000000, box.priv.A})
> +test:is_deeply({ok, tostring(res)}, {false, errmsg}, "Function exists")
3. Shouldn't the message be like a comment? Describing the correct
behaviour. It is printed always along with ok/no ok in the tap output.
So it should be about what is expected.
> diff --git a/test/box-tap/suite.ini b/test/box-tap/suite.ini
> index b09d7db4f..fd55d5d24 100644
> --- a/test/box-tap/suite.ini
> +++ b/test/box-tap/suite.ini
> @@ -3,7 +3,7 @@ core = app
> description = Database tests with #! using TAP
> is_parallel = True
> use_unix_sockets_iproto = True
> -release_disabled = errinj_set_with_enviroment_vars.test.lua
> +release_disabled = errinj_set_with_enviroment_vars.test.lua, gh-6295-assert-on-wrong-id.test.lua
4. Why? The test does not pass in release?
> config = suite.cfg
> fragile = {
> "retries": 10,
>
More information about the Tarantool-patches
mailing list