Skip to content

test: improve vinyl-luatest/select_consistency_test.lua#11149

Merged
locker merged 2 commits intotarantool:masterfrom
locker:vy-select-consistency-test-fix
Feb 18, 2025
Merged

test: improve vinyl-luatest/select_consistency_test.lua#11149
locker merged 2 commits intotarantool:masterfrom
locker:vy-select-consistency-test-fix

Conversation

@locker
Copy link
Member

@locker locker commented Feb 14, 2025

This PR makes the vinyl-luatest/select_consistency_test.lua faster and more thorough at the same time. It also drops the legacy diff test vinyl/select_consistency.test.lua, because the new test covers all checks performed by the old test and more.

Closes #11046

DO NOT MERGE before #11148, because the updated test fails frequently because of the bugs fixed by that PR.

@locker locker added the do not merge Not ready to be merged label Feb 14, 2025
@locker locker force-pushed the vy-select-consistency-test-fix branch 2 times, most recently from 4ff9e01 to 3ad3009 Compare February 18, 2025 07:54
@locker locker removed the do not merge Not ready to be merged label Feb 18, 2025
@coveralls
Copy link

coveralls commented Feb 18, 2025

Coverage Status

coverage: 87.431% (+0.03%) from 87.406%
when pulling e274926 on locker:vy-select-consistency-test-fix
into d31bd73
on tarantool:master
.

@locker locker requested a review from nshy February 18, 2025 09:40
@nshy nshy assigned locker and unassigned nshy Feb 18, 2025
@locker locker force-pushed the vy-select-consistency-test-fix branch from 3ad3009 to 345c6ad Compare February 18, 2025 12:09
 - Do not restart the server and rerun the stress test, because it
   didn't help us find any new bugs, but it did double the total test
   execution time.
 - Reduce the test run time to ~10 seconds and remove it from the long
   test list.
 - Pick the transaction isolation level randomly.
 - Make the padding size random.
 - Generate 'update' operations in addition to 'insert', 'delete', and
   'upsert'.
 - Inject random fiber yields between operations.
 - Reduce the number of keys to 1000 and the number of values to 10,
   because it increases the number of conflicts thus making the test
   more intensive. Adjust the max padding size, L0 size, cache size,
   and target range size accordingly.
 - Enable verbose logging as it may be useful for debugging.
 - Log all actions taken by the test, because due to the asynchronous
   nature of the test, it's impossible to debug without logging.
 - Join test fibers instead of using channels.

Closes tarantool#11046

NO_DOC=testing
NO_CHANGELOG=testing
The new test vinyl-luatest/select_consistency_test.lua covers all checks
performed by the old diff test and at the same time it's much more
thorough. Let's drop the old test - it didn't help us find any bugs
anyway.

NO_DOC=testing
NO_CHANGELOG=testing
@locker locker force-pushed the vy-select-consistency-test-fix branch from 345c6ad to e274926 Compare February 18, 2025 12:37
@locker
Copy link
Member Author

locker commented Feb 18, 2025

  • Enabled verbose logging to log all compaction actions.
  • Reduced the target range size to make vinyl split ranges more intensively.
diff
diff --git a/test/vinyl-luatest/select_consistency_test.lua b/test/vinyl-luatest/select_consistency_test.lua
index b7af179fc200..6a54adbb6875 100644
--- a/test/vinyl-luatest/select_consistency_test.lua
+++ b/test/vinyl-luatest/select_consistency_test.lua
@@ -9,12 +9,13 @@ g.before_all(function(cg)
     cg.server = server:new({
         alias = 'master',
         box_cfg = {
+            log_level = 'verbose',
             vinyl_memory = 1024 * 1024,
             vinyl_cache = 512 * 1024,
             vinyl_run_count_per_level = 1,
             vinyl_run_size_ratio = 4,
             vinyl_page_size = 1024,
-            vinyl_range_size = 128 * 1024,
+            vinyl_range_size = 64 * 1024,
             vinyl_bloom_fpr = 0.1,
             vinyl_read_threads = 2,
             vinyl_write_threads = 4,

@locker locker added the full-ci Enables all tests for a pull request label Feb 18, 2025
@locker locker merged commit 153463d into tarantool:master Feb 18, 2025
95 checks passed
@locker locker deleted the vy-select-consistency-test-fix branch February 18, 2025 14:54
@locker
Copy link
Member Author

locker commented Feb 18, 2025

Cherry-picked to 2.11, 3.2, 3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vinyl-luatest/select_consistency_test.lua:200: Assertion failed: 4 >= 5

3 participants