Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1] test: vinyl/errinj test fails under highload
@ 2019-04-17  7:50 avtikhon
  2019-04-17  8:44 ` Vladimir Davydov
  0 siblings, 1 reply; 2+ messages in thread
From: avtikhon @ 2019-04-17  7:50 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: avtikhon, tarantool-patches

Test "check that all dump/compaction tasks that are in progress at
the time when the server stops are aborted immediately.", but in
real the awaiting time of 1 second is not enough due to runs in
parallel and it fails, like:

[009] --- vinyl/errinj.result Tue Apr 16 16:43:36 2019
[009] +++ vinyl/errinj.reject Wed Apr 17 09:42:36 2019
[009] @@ -530,7 +530,7 @@
[009] ...
[009] t2 - t1 < 1
[009] ---
[009] -- true
[009] +- false
[009] ...
[009] test_run:cmd("cleanup server test")
[009] ---
[009]

in 100 parallel runs the failed delays were found:

[002] +- 1.4104716777802
[022] +- 1.3933029174805
[044] +- 1.4296517372131
[033] +- 1.6380662918091
[001] +- 1.9799520969391
[027] +- 1.7067711353302
[043] +- 1.3778221607208
[034] +- 1.3820221424103
[032] +- 1.3820221424103
[020] +- 1.6275615692139
[050] +- 1.6275615692139
[048] +- 1.1880359649658

Desided to increase the awiting time up to 3 seconds.

Close #4169
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4169-vinyl-errinj-highload
Issue: https://github.com/tarantool/tarantool/issues/4169

 test/vinyl/errinj.result   | 2 +-
 test/vinyl/errinj.test.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/vinyl/errinj.result b/test/vinyl/errinj.result
index 6fc4d9e5d..9b1ded612 100644
--- a/test/vinyl/errinj.result
+++ b/test/vinyl/errinj.result
@@ -528,7 +528,7 @@ test_run:cmd("stop server test")
 t2 = fiber.time()
 ---
 ...
-t2 - t1 < 1
+t2 - t1 < 3 or t2 - t1
 ---
 - true
 ...
diff --git a/test/vinyl/errinj.test.lua b/test/vinyl/errinj.test.lua
index b500b33c6..dab35b3b1 100644
--- a/test/vinyl/errinj.test.lua
+++ b/test/vinyl/errinj.test.lua
@@ -191,7 +191,7 @@ test_run:cmd('switch default')
 t1 = fiber.time()
 test_run:cmd("stop server test")
 t2 = fiber.time()
-t2 - t1 < 1
+t2 - t1 < 3 or t2 - t1
 test_run:cmd("cleanup server test")
 
 s = box.schema.space.create('test', {engine = 'vinyl'})
-- 
2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [tarantool-patches] [PATCH v1] test: vinyl/errinj test fails under highload
  2019-04-17  7:50 [tarantool-patches] [PATCH v1] test: vinyl/errinj test fails under highload avtikhon
@ 2019-04-17  8:44 ` Vladimir Davydov
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Davydov @ 2019-04-17  8:44 UTC (permalink / raw)
  To: avtikhon; +Cc: Alexander Turenko, tarantool-patches

On Wed, Apr 17, 2019 at 10:50:47AM +0300, avtikhon wrote:
> Test "check that all dump/compaction tasks that are in progress at
> the time when the server stops are aborted immediately.", but in
> real the awaiting time of 1 second is not enough due to runs in
> parallel and it fails, like:
> 
> [009] --- vinyl/errinj.result Tue Apr 16 16:43:36 2019
> [009] +++ vinyl/errinj.reject Wed Apr 17 09:42:36 2019
> [009] @@ -530,7 +530,7 @@
> [009] ...
> [009] t2 - t1 < 1
> [009] ---
> [009] -- true
> [009] +- false
> [009] ...
> [009] test_run:cmd("cleanup server test")
> [009] ---
> [009]
> 
> in 100 parallel runs the failed delays were found:
> 
> [002] +- 1.4104716777802
> [022] +- 1.3933029174805
> [044] +- 1.4296517372131
> [033] +- 1.6380662918091
> [001] +- 1.9799520969391
> [027] +- 1.7067711353302
> [043] +- 1.3778221607208
> [034] +- 1.3820221424103
> [032] +- 1.3820221424103
> [020] +- 1.6275615692139
> [050] +- 1.6275615692139
> [048] +- 1.1880359649658
> 
> Desided to increase the awiting time up to 3 seconds.
> 
> Close #4169
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4169-vinyl-errinj-highload
> Issue: https://github.com/tarantool/tarantool/issues/4169
> 
>  test/vinyl/errinj.result   | 2 +-
>  test/vinyl/errinj.test.lua | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/vinyl/errinj.result b/test/vinyl/errinj.result
> index 6fc4d9e5d..9b1ded612 100644
> --- a/test/vinyl/errinj.result
> +++ b/test/vinyl/errinj.result
> @@ -528,7 +528,7 @@ test_run:cmd("stop server test")
>  t2 = fiber.time()
>  ---
>  ...
> -t2 - t1 < 1
> +t2 - t1 < 3 or t2 - t1
>  ---
>  - true
>  ...
> diff --git a/test/vinyl/errinj.test.lua b/test/vinyl/errinj.test.lua
> index b500b33c6..dab35b3b1 100644
> --- a/test/vinyl/errinj.test.lua
> +++ b/test/vinyl/errinj.test.lua
> @@ -191,7 +191,7 @@ test_run:cmd('switch default')
>  t1 = fiber.time()
>  test_run:cmd("stop server test")
>  t2 = fiber.time()
> -t2 - t1 < 1
> +t2 - t1 < 3 or t2 - t1
>  test_run:cmd("cleanup server test")

Try using ERRINJ_VY_DUMP_DELAY instead. Then you wouldn't need to check
the time at all - the server just wouldn't stop unless pending tasks was
cancelled. You can check that by commenting out vy_worker_pool_stop.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-17  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17  7:50 [tarantool-patches] [PATCH v1] test: vinyl/errinj test fails under highload avtikhon
2019-04-17  8:44 ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox