mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
osd/PG: do final pg delete transaction on pg sequencer
Simpler, cleaner. Also, this way we flush before returning. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
1eec5bb6a2
commit
68dac914ed
@ -6533,24 +6533,14 @@ void PG::_delete_some()
|
||||
{
|
||||
ObjectStore::Transaction t;
|
||||
PGRef pgref(this);
|
||||
PGLog::clear_info_log(info.pgid, &t);
|
||||
t.remove_collection(coll);
|
||||
t.register_on_commit(new ContainerContext<PGRef>(pgref));
|
||||
t.register_on_applied(new ContainerContext<PGRef>(pgref));
|
||||
osd->store->queue_transaction(ch, std::move(t));
|
||||
}
|
||||
ch->flush();
|
||||
|
||||
ObjectStore::Transaction t;
|
||||
PGLog::clear_info_log(info.pgid, &t);
|
||||
t.remove_collection(coll);
|
||||
PGRef pgref(this);
|
||||
// keep pg ref around until txn completes to avoid any issues
|
||||
// with Sequencer lifecycle (seen w/ filestore).
|
||||
t.register_on_commit(new ContainerContext<PGRef>(pgref));
|
||||
t.register_on_applied(new ContainerContext<PGRef>(pgref));
|
||||
int r = osd->store->queue_transaction(
|
||||
osd->meta_ch, std::move(t));
|
||||
assert(r == 0);
|
||||
|
||||
osd->finish_pg_delete(this, pool.info.get_pg_num());
|
||||
deleted = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user