row_cache: pass a valid permit to underlying read

All reader are soon going to require a valid permit, so make sure we
have a valid permit which we can pass to the underlying reader when
creating it. This means `row_cache::make_reader()` now also requires
a permit to be passed to it.
This commit is contained in:
Botond Dénes
2020-04-15 15:34:19 +03:00
parent 9ede82ebf8
commit fe024cecdc
9 changed files with 142 additions and 134 deletions

View File

@@ -153,7 +153,7 @@ void run_test(const sstring& name, schema_ptr s, MutationGenerator&& gen) {
// Create a reader which tests the case of memtable snapshots
// going away after memtable was merged to cache.
auto rd = std::make_unique<flat_mutation_reader>(
make_combined_reader(s, cache.make_reader(s), mt->make_flat_reader(s, tests::make_permit())));
make_combined_reader(s, cache.make_reader(s, tests::make_permit()), mt->make_flat_reader(s, tests::make_permit())));
rd->set_max_buffer_size(1);
rd->fill_buffer(db::no_timeout).get();