mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-07 07:23:15 +00:00
Merge ' Remove unnecessary schema copies' from Piotr
Most of the time schema does not have to be copied and sometimes it's not even used. tests: unit(dev) Closes #5739 * hawk/remove_schema_copies: multishard_mutation_query_test: stop capturing unused schema index_reader: avoid copying schema to lambda
This commit is contained in:
@@ -597,7 +597,7 @@ private:
|
||||
}
|
||||
|
||||
const schema& s = *_sstable->_schema;
|
||||
auto cmp_with_start = [pos_cmp = promoted_index_block_compare(s), s]
|
||||
auto cmp_with_start = [pos_cmp = promoted_index_block_compare(s), &s]
|
||||
(position_in_partition_view pos, const promoted_index_block& info) -> bool {
|
||||
return pos_cmp(pos, info.start(s));
|
||||
};
|
||||
|
||||
@@ -646,7 +646,7 @@ generate_clustering_ranges(RandomEngine& rnd_engine, const schema& schema, const
|
||||
start = end;
|
||||
}
|
||||
|
||||
clustering_key_ranges.emplace_back(clustering_index_range.transform([schema, &all_cks] (int i) {
|
||||
clustering_key_ranges.emplace_back(clustering_index_range.transform([&all_cks] (int i) {
|
||||
return all_cks.at(i);
|
||||
}));
|
||||
} while (start < end);
|
||||
|
||||
Reference in New Issue
Block a user