mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
test/boost/index_with_paging_test: parallel insert
Parallelize inserts for long-running test_index_with_paging. Run time in debug mode reduced by 1 minute 48 seconds. Refs #13905 Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
This commit is contained in:
@@ -22,14 +22,15 @@ SEASTAR_TEST_CASE(test_index_with_paging) {
|
||||
// There should be enough rows to use multiple pages
|
||||
auto prepared_id = e.prepare("INSERT INTO tab (pk, ck, v, v2, v3) VALUES (?, ?, 1, ?, ?)").get0();
|
||||
auto big_string_v = cql3::raw_value::make_value(serialized(big_string));
|
||||
for (int i = 0; i < 64 * 1024; ++i) {
|
||||
e.execute_prepared(prepared_id, {
|
||||
max_concurrent_for_each(boost::irange(0, 64 * 1024), 2, [&] (auto i) {
|
||||
return e.execute_prepared(prepared_id, {
|
||||
cql3::raw_value::make_value(serialized(i % 3)), // pk
|
||||
cql3::raw_value::make_value(serialized(format("hello{}", i))), // ck
|
||||
cql3::raw_value::make_value(int32_type->decompose(data_value(i))), // v2
|
||||
big_string_v, // v3
|
||||
}).get();
|
||||
}
|
||||
|
||||
}).discard_result();
|
||||
}).get();
|
||||
|
||||
e.db().invoke_on_all([] (replica::database& db) {
|
||||
// The semaphore's queue has to able to absorb one read / row in this test.
|
||||
|
||||
Reference in New Issue
Block a user