From 4a45a4d568a3251c1f34f1f1b2eb5a71f474713b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 12 Dec 2017 09:24:23 -0600 Subject: [PATCH] osd/PG: carry pg ref for final pg delete txn FileStore breaks of the Sequencer is destroyed while the txn is in flight. Signed-off-by: Sage Weil --- src/osd/PG.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index bca148e3fdb..76660d24283 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(this)); + new ContainerContext(pgref), + new ContainerContext(pgref)); assert(r == 0); osd->finish_pg_delete(this); -- 2.39.5