{string{infover_key},
string{info_key},
string{biginfo_key},
- string{fastinfo_key}}).then(
- [this](auto&& values) {
- {
- // sanity check
- auto infover = find_value<__u8>(values, infover_key);
- assert(infover);
- if (infover < 10) {
- throw std::runtime_error("incompatible pg meta");
- }
- }
- pg_info_t info;
- {
- auto found = find_value<pg_info_t>(values, info_key);
- assert(found);
- info = *std::move(found);
+ string{fastinfo_key}});
+ }).then([this](auto&& values) {
+ {
+ // sanity check
+ auto infover = find_value<__u8>(values, infover_key);
+ assert(infover);
+ if (infover < 10) {
+ throw std::runtime_error("incompatible pg meta");
}
- PastIntervals past_intervals;
- {
- using biginfo_t = std::pair<PastIntervals, decltype(info.purged_snaps)>;
- auto big_info = find_value<biginfo_t>(values, biginfo_key);
- assert(big_info);
- past_intervals = std::move(big_info->first);
- info.purged_snaps = std::move(big_info->second);
- }
- {
- auto fast_info = find_value<pg_fast_info_t>(values, fastinfo_key);
- if (fast_info) {
- fast_info->try_apply_to(&info);
- }
+ }
+ pg_info_t info;
+ {
+ auto found = find_value<pg_info_t>(values, info_key);
+ assert(found);
+ info = *std::move(found);
+ }
+ PastIntervals past_intervals;
+ {
+ using biginfo_t = std::pair<PastIntervals, decltype(info.purged_snaps)>;
+ auto big_info = find_value<biginfo_t>(values, biginfo_key);
+ assert(big_info);
+ past_intervals = std::move(big_info->first);
+ info.purged_snaps = std::move(big_info->second);
+ }
+ {
+ auto fast_info = find_value<pg_fast_info_t>(values, fastinfo_key);
+ if (fast_info) {
+ 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<pg_info_t, PastIntervals>(
+ std::move(info),
+ std::move(past_intervals));
});
}