Change sstable_list from a map to a set

sstable_list is now a map<generation, sstable>; change it to a set
in preparation for replacing it with sstable_set.  The change simplifies
a lot of code; the only casualty is the code that computes the highest
generation number.
This commit is contained in:
Avi Kivity
2016-06-30 15:44:32 +03:00
parent 386c0dd4b2
commit 2a46410f4a
12 changed files with 68 additions and 67 deletions

View File

@@ -124,7 +124,7 @@ future<> db::commitlog_replayer::impl::init() {
return do_with(shard_rpm_map{}, [this, &qp](shard_rpm_map& map) {
return parallel_for_each(qp.db().local().get_column_families(), [&map, &qp](auto& cfp) {
auto uuid = cfp.first;
for (auto& sst : *cfp.second->get_sstables() | boost::adaptors::map_values) {
for (auto& sst : *cfp.second->get_sstables()) {
try {
auto p = sst->get_stats_metadata().position;
logger.trace("sstable {} -> rp {}", sst->get_filename(), p);