if (!superblock.maps.empty()) {
pg_shard_manager.trim_maps(t, superblock);
+ // TODO: once we support pg splitting, update pg_num_history here
+ //pg_num_history.prune(superblock.get_oldest_map());
}
superblock.insert_osdmap_epochs(first, last);
seastar::future<OSDSingletonState::local_cached_map_t>
OSDSingletonState::get_local_map(epoch_t e)
{
- // 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));
logger().debug("{} loading maps [{},{}]",
__func__, first, last);
ceph_assert(first <= last);
+ // TODO: take osd_map_max into account
+ //int max = cct->_conf->osd_map_message_max;
+ //ssize_t max_bytes = cct->_conf->osd_map_message_max_bytes;
return seastar::map_reduce(boost::make_counting_iterator<epoch_t>(first),
boost::make_counting_iterator<epoch_t>(last + 1),
[this](epoch_t e) {
"superblock's oldest map: {}",
__func__, first, superblock.get_oldest_map());
if (first >= superblock.get_oldest_map()) {
+ // TODO: osd_map_share_max_epochs
+ // See OSDService::build_incremental_map_msg
if (first < superblock.cluster_osdmap_trim_lower_bound) {
logger().info("{}: cluster osdmap lower bound: {} "
" > first {}, starting with full map",