* [PATCH v1 1/1] vinyl: box/errinj.test.lua fails sporadically
@ 2018-08-08 16:15 imeevma
2018-08-08 16:31 ` Vladimir Davydov
0 siblings, 1 reply; 2+ messages in thread
From: imeevma @ 2018-08-08 16:15 UTC (permalink / raw)
To: tarantool-patches; +Cc: v.shpilevoy, vdavydov.dev
In some cases operation box.snapshot() was longer than
expected. This lead to situation when previous error
was repeated instead of new one. Now these errors
completely separated.
Closes #3599.
---
Branch: imeevma/gh-3599-box-errinj-fails-sporadically
Issue: https://github.com/tarantool/tarantool/issues/3599
test/box/errinj.result | 22 ++++++++++++++++++----
test/box/errinj.test.lua | 15 +++++++++++----
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/test/box/errinj.result b/test/box/errinj.result
index 78aebf1..97546e5 100644
--- a/test/box/errinj.result
+++ b/test/box/errinj.result
@@ -1284,8 +1284,9 @@ errinj.set('ERRINJ_VY_LOG_FILE_RENAME', false)
---
- ok
...
-for i = 1, 10 do box.space.test:insert{i} end
+errinj.set('ERRINJ_VY_GC', true)
---
+- ok
...
errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0.001)
---
@@ -1295,20 +1296,29 @@ errinj.set('ERRINJ_VY_RUN_FILE_RENAME', true)
---
- ok
...
+box.space.test:insert{1}
+---
+- [1]
+...
box.snapshot() -- error
---
- error: Error injection 'vinyl run file rename'
...
-errinj.set('ERRINJ_VY_INDEX_FILE_RENAME', true)
+errinj.set('ERRINJ_VY_RUN_FILE_RENAME', false)
---
- ok
...
-errinj.set('ERRINJ_VY_RUN_FILE_RENAME', false)
+-- Wait for the scheduler to unthrottle.
+repeat fiber.sleep(0.001) until pcall(box.snapshot)
+---
+...
+errinj.set('ERRINJ_VY_INDEX_FILE_RENAME', true)
---
- ok
...
-fiber.sleep(0.01)
+box.space.test:insert{2}
---
+- [2]
...
box.snapshot() -- error
---
@@ -1322,6 +1332,10 @@ errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0)
---
- ok
...
+errinj.set('ERRINJ_VY_GC', false)
+---
+- ok
+...
#fio.glob(fio.pathjoin(box.cfg.vinyl_dir, '*.vylog.inprogress')) > 0
---
- true
diff --git a/test/box/errinj.test.lua b/test/box/errinj.test.lua
index 04f09bd..5c0465e 100644
--- a/test/box/errinj.test.lua
+++ b/test/box/errinj.test.lua
@@ -448,17 +448,24 @@ errinj.set('ERRINJ_VY_LOG_FILE_RENAME', true)
box.snapshot()
errinj.set('ERRINJ_VY_LOG_FILE_RENAME', false)
-for i = 1, 10 do box.space.test:insert{i} end
-
+errinj.set('ERRINJ_VY_GC', true)
errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0.001)
+
errinj.set('ERRINJ_VY_RUN_FILE_RENAME', true)
+box.space.test:insert{1}
box.snapshot() -- error
-errinj.set('ERRINJ_VY_INDEX_FILE_RENAME', true)
errinj.set('ERRINJ_VY_RUN_FILE_RENAME', false)
-fiber.sleep(0.01)
+
+-- Wait for the scheduler to unthrottle.
+repeat fiber.sleep(0.001) until pcall(box.snapshot)
+
+errinj.set('ERRINJ_VY_INDEX_FILE_RENAME', true)
+box.space.test:insert{2}
box.snapshot() -- error
errinj.set('ERRINJ_VY_INDEX_FILE_RENAME', false)
+
errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0)
+errinj.set('ERRINJ_VY_GC', false)
#fio.glob(fio.pathjoin(box.cfg.vinyl_dir, '*.vylog.inprogress')) > 0
#fio.glob(fio.pathjoin(box.cfg.vinyl_dir, box.space.test.id, 0, '*.run.inprogress')) > 0
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] vinyl: box/errinj.test.lua fails sporadically
2018-08-08 16:15 [PATCH v1 1/1] vinyl: box/errinj.test.lua fails sporadically imeevma
@ 2018-08-08 16:31 ` Vladimir Davydov
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Davydov @ 2018-08-08 16:31 UTC (permalink / raw)
To: imeevma; +Cc: tarantool-patches, v.shpilevoy
Pushed to 1.9
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-08 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 16:15 [PATCH v1 1/1] vinyl: box/errinj.test.lua fails sporadically imeevma
2018-08-08 16:31 ` Vladimir Davydov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox