Skip to content
Snippets Groups Projects
Commit 7f8c549b authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

test: fix flaky vinyl/deferred_delete test

The commit fixes the following test failure:

```
[019] vinyl/deferred_delete.test.lua                                  [ fail ]
[019]
[019] Test failed! Result content mismatch:
[019] --- vinyl/deferred_delete.result	Tue Jan 11 11:10:22 2022
[019] +++ /build/usr/src/debug/tarantool-2.10.0~beta2.37.dev/test/var/rejects/vinyl/deferred_delete.reject	Fri Jan 14 11:45:26 2022
[019] @@ -964,7 +964,7 @@
[019]  ...
[019]  sk:stat().disk.dump.count -- 1
[019]  ---
[019] -- 1
[019] +- 0
[019]  ...
[019]  sk:stat().rows - dummy_rows -- 120 old REPLACEs + 120 new REPLACEs + 120 deferred DELETEs
[019]  ---
```

The test checks that compaction of a primary index triggers dump of
secondary indexes of the same space, because it generates deferred
DELETE statements. There's no guarantee that by the time compaction
completes, secondary index dump have been completed as well, because
compaction may ignore the memory quota (it uses vy_quota_force_use in
vy_deferred_delete_on_replace). Make the check more robust by using
wait_cond.

Follow-up #5089
parent 8c913a10
No related branches found
No related tags found
No related merge requests found
......@@ -965,9 +965,9 @@ test_run:wait_cond(function() return pk:stat().disk.compaction.count > 0 end)
---
- true
...
sk:stat().disk.dump.count -- 1
test_run:wait_cond(function() return sk:stat().disk.dump.count > 0 end)
---
- 1
- true
...
sk:stat().rows - dummy_rows -- 120 old REPLACEs + 120 new REPLACEs + 120 deferred DELETEs
---
......
......@@ -353,8 +353,7 @@ box.stat.reset()
-- of the secondary index.
pk:compact()
test_run:wait_cond(function() return pk:stat().disk.compaction.count > 0 end)
sk:stat().disk.dump.count -- 1
test_run:wait_cond(function() return sk:stat().disk.dump.count > 0 end)
sk:stat().rows - dummy_rows -- 120 old REPLACEs + 120 new REPLACEs + 120 deferred DELETEs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment