From 1b95f5bf60d84306cc465c890aaa7d7744c5bfb0 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Thu, 3 Oct 2019 18:24:24 +0200 Subject: [PATCH] tests: row_cache_stress_test: Exercise single-partition reads make_single_key_reader() currently doesn't actually create single-partition readers because it doesn't set mutation_reader::forwarding::no when it creates individual readers. The readers will default to mutation_reader::forwarding::yes and actually create scanning readers in preparation for fast-forwarding across partitions. Fix by passing mutation_reader::forwarding::no. --- tests/row_cache_stress_test.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/row_cache_stress_test.cc b/tests/row_cache_stress_test.cc index 53c90a42d3..1c3c01719b 100644 --- a/tests/row_cache_stress_test.cc +++ b/tests/row_cache_stress_test.cc @@ -149,11 +149,14 @@ struct table { auto r = std::make_unique(reader{std::move(pr), std::move(slice), make_empty_flat_reader(s.schema())}); std::vector rd; if (prev_mt) { - rd.push_back(prev_mt->make_flat_reader(s.schema(), r->pr, r->slice)); + rd.push_back(prev_mt->make_flat_reader(s.schema(), r->pr, r->slice, default_priority_class(), nullptr, + streamed_mutation::forwarding::no, mutation_reader::forwarding::no)); } - rd.push_back(mt->make_flat_reader(s.schema(), r->pr, r->slice)); - rd.push_back(cache.make_reader(s.schema(), r->pr, r->slice)); - r->rd = make_combined_reader(s.schema(), std::move(rd), streamed_mutation::forwarding::yes, mutation_reader::forwarding::no); + rd.push_back(mt->make_flat_reader(s.schema(), r->pr, r->slice, default_priority_class(), nullptr, + streamed_mutation::forwarding::no, mutation_reader::forwarding::no)); + rd.push_back(cache.make_reader(s.schema(), r->pr, r->slice, default_priority_class(), nullptr, + streamed_mutation::forwarding::no, mutation_reader::forwarding::no)); + r->rd = make_combined_reader(s.schema(), std::move(rd), streamed_mutation::forwarding::no, mutation_reader::forwarding::no); return r; }