File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next)
481481 auto [objs_to_rm, next] = fut.get ();
482482 if (objs_to_rm.empty ()) {
483483 logger ().info (" all objs removed, removing coll for {}" , pgid);
484+ t.remove (coll_ref->get_cid (), pgid.make_snapmapper_oid ());
484485 t.remove (coll_ref->get_cid (), pgmeta_oid);
485486 t.remove_collection (coll_ref->get_cid ());
486487 (void ) shard_services.get_store ().do_transaction (
@@ -490,7 +491,7 @@ PG::do_delete_work(ceph::os::Transaction &t, ghobject_t _next)
490491 return {next, false };
491492 } else {
492493 for (auto &obj : objs_to_rm) {
493- if (obj == pgmeta_oid) {
494+ if (obj == pgmeta_oid || obj. is_internal_pg_local () ) {
494495 continue ;
495496 }
496497 logger ().trace (" pg {}, removing obj {}" , pgid, obj);
Original file line number Diff line number Diff line change @@ -767,20 +767,26 @@ seastar::future<> ShardServices::dispatch_context_transaction(
767767 LOG_PREFIX (OSDSingletonState::dispatch_context_transaction);
768768 if (ctx.transaction .empty ()) {
769769 DEBUG (" empty transaction" );
770- return seastar::now ();
770+ co_await get_store ().flush (col);
771+ Context* on_commit (
772+ ceph::os::Transaction::collect_all_contexts (ctx.transaction ));
773+ if (on_commit) {
774+ on_commit->complete (0 );
775+ }
776+ co_return ;
771777 }
772778
773779 DEBUG (" do_transaction ..." );
774- auto ret = get_store ().do_transaction (
780+ co_await get_store ().do_transaction (
775781 col,
776782 ctx.transaction .claim_and_reset ());
777- return ret ;
783+ co_return ;
778784}
779785
780786seastar::future<> ShardServices::dispatch_context_messages (
781787 BufferedRecoveryMessages &&ctx)
782788{
783- LOG_PREFIX (OSDSingletonState::dispatch_context_transaction );
789+ LOG_PREFIX (OSDSingletonState::dispatch_context_messages );
784790 auto ret = seastar::parallel_for_each (std::move (ctx.message_map ),
785791 [FNAME, this ](auto & osd_messages) {
786792 auto & [peer, messages] = osd_messages;
You can’t perform that action at this time.
0 commit comments