ShardServices &shard_services, Ref<PG> pg, epoch_t to,
PeeringCtx &&rctx, bool do_init)
: shard_services(shard_services), pg(pg), to(to),
- rctx(std::move(rctx)), do_init(do_init) {}
+ rctx(std::move(rctx)), do_init(do_init)
+{
+ logger().debug("{}: created", *this);
+}
PGAdvanceMap::~PGAdvanceMap() {}
});
}
return fut.then([this] {
+ ceph_assert(std::cmp_less_equal(*from, to));
return seastar::do_for_each(
boost::make_counting_iterator(*from + 1),
boost::make_counting_iterator(to + 1),
[this](epoch_t next_epoch) {
+ logger().debug("{}: start: getting map {}",
+ *this, next_epoch);
return shard_services.get_map(next_epoch).then(
[this] (cached_map_t&& next_map) {
logger().debug("{}: advancing map to {}",
{
// TODO: use LRU cache for managing osdmap, fallback to disk if we have to
if (auto found = osdmaps.find(e); found) {
+ logger().debug("{} osdmap.{} found in cache", __func__, e);
return seastar::make_ready_future<local_cached_map_t>(std::move(found));
} else {
+ logger().debug("{} loading osdmap.{} from disk", __func__, e);
return load_map(e).then([e, this](std::unique_ptr<OSDMap> osdmap) {
return seastar::make_ready_future<local_cached_map_t>(
osdmaps.insert(e, std::move(osdmap)));
epoch_t e)
{
if (std::optional<bufferlist> found = map_bl_cache.find(e); found) {
+ logger().debug("{} osdmap.{} found in cache", __func__, e);
return seastar::make_ready_future<bufferlist>(*found);
} else {
+ logger().debug("{} loading osdmap.{} from disk", __func__, e);
return meta_coll->load_map(e);
}
}
if (auto p = m->maps.find(e); p != m->maps.end()) {
auto o = std::make_unique<OSDMap>();
o->decode(p->second);
- logger().info("store_maps osdmap.{}", e);
+ logger().info("store_maps storing osdmap.{}", e);
store_map_bl(t, e, std::move(std::move(p->second)));
osdmaps.insert(e, std::move(o));
return seastar::now();
} else if (auto p = m->incremental_maps.find(e);
p != m->incremental_maps.end()) {
+ logger().info("store_maps found osdmap.{} incremental map, "
+ "loading osdmap.{}", e, e - 1);
+ ceph_assert(std::cmp_greater(e, 0u));
return load_map(e - 1).then([e, bl=p->second, &t, this](auto o) {
OSDMap::Incremental inc;
auto i = bl.cbegin();
o->apply_incremental(inc);
bufferlist fbl;
o->encode(fbl, inc.encode_features | CEPH_FEATURE_RESERVED);
+ logger().info("store_maps storing osdmap.{}", o->get_epoch());
store_map_bl(t, e, std::move(fbl));
osdmaps.insert(e, std::move(o));
return seastar::now();
crimson::net::Connection &conn,
epoch_t first)
{
+ logger().info("{}: first osdmap: {} "
+ "superblock's oldest map: {}",
+ __func__, first, superblock.oldest_map);
if (first >= superblock.oldest_map) {
return load_map_bls(
first, superblock.newest_map