]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: carry pg ref for final pg delete txn
authorSage Weil <sage@redhat.com>
Tue, 12 Dec 2017 15:24:23 +0000 (09:24 -0600)
committerSage Weil <sage@redhat.com>
Thu, 11 Jan 2018 23:07:00 +0000 (17:07 -0600)
FileStore breaks of the Sequencer is destroyed while the txn is in flight.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index bca148e3fdb7f9a043e5e40cf943b82c7ec0e5a3..76660d242831547cc045ab6b1e8ce12552c99f66 100644 (file)
@@ -6104,11 +6104,13 @@ void PG::_delete_some()
     ObjectStore::Transaction t;
     PGLog::clear_info_log(info.pgid, &t);
     t.remove_collection(coll);
+    PGRef pgref(this);
     int r = osd->store->queue_transaction(
       osd->meta_osr.get(), std::move(t),
       // keep pg ref around until txn completes to avoid any issues
       // with Sequencer lifecycle (seen w/ filestore).
-      new ContainerContext<PGRef>(this));
+      new ContainerContext<PGRef>(pgref),
+      new ContainerContext<PGRef>(pgref));
     assert(r == 0);
 
     osd->finish_pg_delete(this);