{
return seastar::do_with(PGMeta(store, pgid), [] (auto& pg_meta) {
return pg_meta.load();
- }).then([this, store](pg_info_t pg_info, PastIntervals past_intervals) {
+ }).then([this, store](auto&& ret) {
+ auto [pg_info, past_intervals] = std::move(ret);
return peering_state.init_from_disk_state(
std::move(pg_info),
std::move(past_intervals),
});
}
-seastar::future<pg_info_t, PastIntervals> PGMeta::load()
+seastar::future<std::tuple<pg_info_t, PastIntervals>> PGMeta::load()
{
return store->open_collection(coll_t{pgid}).then([this](auto ch) {
return store->omap_get_values(ch,
fast_info->try_apply_to(&info);
}
}
- return seastar::make_ready_future<pg_info_t, PastIntervals>(
- std::move(info),
- std::move(past_intervals));
+ return seastar::make_ready_future<std::tuple<pg_info_t, PastIntervals>>(
+ std::make_tuple(std::move(info), std::move(past_intervals)));
});
}
#pragma once
+#include <tuple>
#include <seastar/core/future.hh>
#include "osd/osd_types.h"
public:
PGMeta(crimson::os::FuturizedStore *store, spg_t pgid);
seastar::future<epoch_t> get_epoch();
- seastar::future<pg_info_t, PastIntervals> load();
+ seastar::future<std::tuple<pg_info_t, PastIntervals>> load();
};