diff options
author | Matan Breizman <mbreizma@redhat.com> | 2023-02-01 10:32:53 +0100 |
---|---|---|
committer | Matan Breizman <mbreizma@redhat.com> | 2023-02-02 11:22:24 +0100 |
commit | 3f92107d99f4ee6a521e994728418ce7cffd2d95 (patch) | |
tree | 1cd3b78749f67bb68796c63432affa51457a91a8 /src | |
parent | messages/MOSDMap: Rename oldest_map to cluster_osdmap_trim_lower_bound (diff) | |
download | ceph-3f92107d99f4ee6a521e994728418ce7cffd2d95.tar.xz ceph-3f92107d99f4ee6a521e994728418ce7cffd2d95.zip |
crimson/osd: Rename MOSDMap::oldest_map users
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/crimson/osd/osd.cc | 15 | ||||
-rw-r--r-- | src/crimson/osd/shard_services.cc | 10 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 0d282327e65..03b002a2a96 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -667,6 +667,8 @@ void OSD::dump_status(Formatter* f) const f->dump_unsigned("whoami", superblock.whoami); f->dump_string("state", pg_shard_manager.get_osd_state_string()); f->dump_unsigned("oldest_map", superblock.oldest_map); + f->dump_unsigned("cluster_osdmap_trim_lower_bound", + superblock.cluster_osdmap_trim_lower_bound); f->dump_unsigned("newest_map", superblock.newest_map); f->dump_unsigned("num_pgs", pg_shard_manager.get_num_pgs()); } @@ -857,7 +859,8 @@ seastar::future<> OSD::handle_osd_map(crimson::net::ConnectionRef conn, const auto first = m->get_first(); const auto last = m->get_last(); logger().info("handle_osd_map epochs [{}..{}], i have {}, src has [{}..{}]", - first, last, superblock.newest_map, m->oldest_map, m->newest_map); + first, last, superblock.newest_map, + m->cluster_osdmap_trim_lower_bound, m->newest_map); // make sure there is something new, here, before we bother flushing // the queues and such if (last <= superblock.newest_map) { @@ -869,15 +872,16 @@ seastar::future<> OSD::handle_osd_map(crimson::net::ConnectionRef conn, if (first > start) { logger().info("handle_osd_map message skips epochs {}..{}", start, first - 1); - if (m->oldest_map <= start) { + if (m->cluster_osdmap_trim_lower_bound <= start) { return get_shard_services().osdmap_subscribe(start, false); } // always try to get the full range of maps--as many as we can. this // 1- is good to have // 2- is at present the only way to ensure that we get a *full* map as // the first map! - if (m->oldest_map < first) { - return get_shard_services().osdmap_subscribe(m->oldest_map - 1, true); + if (m->cluster_osdmap_trim_lower_bound < first) { + return get_shard_services().osdmap_subscribe( + m->cluster_osdmap_trim_lower_bound - 1, true); } skip_maps = true; start = first; @@ -984,7 +988,8 @@ seastar::future<> OSD::committed_osd_maps(version_t first, logger().info("osd.{}: now preboot", whoami); if (m->get_source().is_mon()) { - return _preboot(m->oldest_map, m->newest_map); + return _preboot( + m->cluster_osdmap_trim_lower_bound, m->newest_map); } else { logger().info("osd.{}: start_boot", whoami); return start_boot(); diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc index a1d2580b358..94ab24ee098 100644 --- a/src/crimson/osd/shard_services.cc +++ b/src/crimson/osd/shard_services.cc @@ -689,7 +689,7 @@ seastar::future<> OSDSingletonState::send_incremental_map( auto m = crimson::make_message<MOSDMap>( monc.get_fsid(), osdmap->get_encoding_features()); - m->oldest_map = first; + m->cluster_osdmap_trim_lower_bound = first; m->newest_map = superblock.newest_map; m->maps = std::move(bls); return conn.send(std::move(m)); @@ -700,7 +700,13 @@ seastar::future<> OSDSingletonState::send_incremental_map( auto m = crimson::make_message<MOSDMap>( monc.get_fsid(), osdmap->get_encoding_features()); - m->oldest_map = superblock.oldest_map; + /* TODO: once we support the tracking of superblock's + * cluster_osdmap_trim_lower_bound, the MOSDMap should + * be populated with this value instead of the oldest_map. + * See: OSD::handle_osd_map for how classic updates the + * cluster's trim lower bound. + */ + m->cluster_osdmap_trim_lower_bound = superblock.oldest_map; m->newest_map = superblock.newest_map; m->maps.emplace(osdmap->get_epoch(), std::move(bl)); return conn.send(std::move(m)); |