Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v2] test: join_vclock test fails under high load
@ 2019-05-08 14:46 Alexander V. Tikhonov
  0 siblings, 0 replies; only message in thread
From: Alexander V. Tikhonov @ 2019-05-08 14:46 UTC (permalink / raw)
  To: Georgy Kirichenko
  Cc: Alexander V . Tikhonov, Alexander Turenko, tarantool-patches

Join vclock test failed on high load:

[015] Test failed! Result content mismatch:
[015] --- replication/join_vclock.result Fri Apr 12 14:49:26 2019
[015] +++ replication/join_vclock.reject Mon Apr 15 17:10:13 2019
[015] @@ -72,7 +72,7 @@
[015] ...
[015] box.space.test.index.primary:max()[1] == cnt - 1
[015] ---
[015] -- true
[015] +- false
[015] ...
[015] test_run:cmd("switch default")
[015] ---

ERRINJ_RELAY_FINAL_SLEEP stops until stop_vclock (see
src/box/relay.cc::relay_final_join() for that code and
src/box/box.cc::box_process_join() for the protocol description). So
after it unblocks a data transfer can be in a progress (during final
join or in subscribed state).

The test case checks that there are no holes at this point, so waiting
here looks inappropriate.

The real problem here is that we check amount of tuples in the space and
a content of a last tuple in a separate requests (test-run sends each
line separately to tarantool).

Close #4160
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh4160-join-vclock-highload
Issue: https://github.com/tarantool/tarantool/issues/4160

 test/replication/join_vclock.result   | 4 ++--
 test/replication/join_vclock.test.lua | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
index a9781073d..2a94100d7 100644
--- a/test/replication/join_vclock.result
+++ b/test/replication/join_vclock.result
@@ -67,10 +67,10 @@ test_run:cmd("switch replica1")
 ---
 - true
 ...
-cnt = box.space.test.index[0]:count()
+cnt = box.space.test.index[0]:count() max = box.space.test.index.primary:max()[1]
 ---
 ...
-box.space.test.index.primary:max()[1] == cnt - 1
+cnt - 1 == max or {cnt - 1, max} -- true
 ---
 - true
 ...
diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
index 0b60dffc2..9bf42041d 100644
--- a/test/replication/join_vclock.test.lua
+++ b/test/replication/join_vclock.test.lua
@@ -26,8 +26,8 @@ ch:get()
 
 errinj.set("ERRINJ_RELAY_FINAL_SLEEP", false)
 test_run:cmd("switch replica1")
-cnt = box.space.test.index[0]:count()
-box.space.test.index.primary:max()[1] == cnt - 1
+cnt = box.space.test.index[0]:count() max = box.space.test.index.primary:max()[1]
+cnt - 1 == max or {cnt - 1, max} -- true
 test_run:cmd("switch default")
 
 replica_set.drop_all(test_run)
-- 
2.17.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-08 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 14:46 [tarantool-patches] [PATCH v2] test: join_vclock test fails under high load Alexander V. Tikhonov

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