diff options
author | Matan Breizman <mbreizma@redhat.com> | 2024-10-14 17:51:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 17:51:51 +0200 |
commit | 096ff995586e29be890805034c2e603cf363c942 (patch) | |
tree | 0cc88d38d3d2c75996e8c9a208d27f68d32e3ce7 /src/crimson | |
parent | Merge pull request #60169 from lee-j-sanders/wip-ljs-rmcosbench (diff) | |
parent | crimson/osd/pg: correct log messages for ShardServices::dispatch_context_mess... (diff) | |
download | ceph-096ff995586e29be890805034c2e603cf363c942.tar.xz ceph-096ff995586e29be890805034c2e603cf363c942.zip |
Merge pull request #59914 from xxhdx1985126/wip-68174
crimson/osd/pg: remove snapmapper objects when eventually removing collections at the last moment of pg deleting, just as pg meta objects
Reviewed-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'src/crimson')
-rw-r--r-- | src/crimson/osd/pg.cc | 3 | ||||
-rw-r--r-- | src/crimson/osd/shard_services.cc | 14 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 088083d7687..97d48c1fa45 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -481,6 +481,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next) auto [objs_to_rm, next] = fut.get(); if (objs_to_rm.empty()) { logger().info("all objs removed, removing coll for {}", pgid); + t.remove(coll_ref->get_cid(), pgid.make_snapmapper_oid()); t.remove(coll_ref->get_cid(), pgmeta_oid); t.remove_collection(coll_ref->get_cid()); (void) shard_services.get_store().do_transaction( @@ -490,7 +491,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next) return {next, false}; } else { for (auto &obj : objs_to_rm) { - if (obj == pgmeta_oid) { + if (obj == pgmeta_oid || obj.is_internal_pg_local()) { continue; } logger().trace("pg {}, removing obj {}", pgid, obj); diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc index 5f7c4a62447..a053d9d5044 100644 --- a/src/crimson/osd/shard_services.cc +++ b/src/crimson/osd/shard_services.cc @@ -767,20 +767,26 @@ seastar::future<> ShardServices::dispatch_context_transaction( LOG_PREFIX(OSDSingletonState::dispatch_context_transaction); if (ctx.transaction.empty()) { DEBUG("empty transaction"); - return seastar::now(); + co_await get_store().flush(col); + Context* on_commit( + ceph::os::Transaction::collect_all_contexts(ctx.transaction)); + if (on_commit) { + on_commit->complete(0); + } + co_return; } DEBUG("do_transaction ..."); - auto ret = get_store().do_transaction( + co_await get_store().do_transaction( col, ctx.transaction.claim_and_reset()); - return ret; + co_return; } seastar::future<> ShardServices::dispatch_context_messages( BufferedRecoveryMessages &&ctx) { - LOG_PREFIX(OSDSingletonState::dispatch_context_transaction); + LOG_PREFIX(OSDSingletonState::dispatch_context_messages); auto ret = seastar::parallel_for_each(std::move(ctx.message_map), [FNAME, this](auto& osd_messages) { auto& [peer, messages] = osd_messages; |