#include "crimson/os/futurized_collection.h"
#include "crimson/os/futurized_store.h"
+using std::string;
+using std::string_view;
// prefix pgmeta_oid keys with _ so that PGLog::read_log_and_missing() can
// easily skip them
using crimson::os::FuturizedStore;
-PGMeta::PGMeta(FuturizedStore* store, spg_t pgid)
+PGMeta::PGMeta(FuturizedStore& store, spg_t pgid)
: store{store},
pgid{pgid}
{}
seastar::future<epoch_t> PGMeta::get_epoch()
{
- return store->open_collection(coll_t{pgid}).then([this](auto ch) {
- return store->omap_get_values(ch,
- pgid.make_pgmeta_oid(),
- {string{infover_key},
- string{epoch_key}}).safe_then(
+ return store.open_collection(coll_t{pgid}).then([this](auto ch) {
+ return store.omap_get_values(ch,
+ pgid.make_pgmeta_oid(),
+ {string{infover_key},
+ string{epoch_key}}).safe_then(
[](auto&& values) {
{
// sanity check
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,
- pgid.make_pgmeta_oid(),
- {string{infover_key},
- string{info_key},
- string{biginfo_key},
- string{fastinfo_key}});
+ return store.open_collection(coll_t{pgid}).then([this](auto ch) {
+ return store.omap_get_values(ch,
+ pgid.make_pgmeta_oid(),
+ {string{infover_key},
+ string{info_key},
+ string{biginfo_key},
+ string{fastinfo_key}});
}).safe_then([](auto&& values) {
{
// sanity check