From: Xuehan Xu Date: Sat, 14 Sep 2024 02:03:21 +0000 (+0800) Subject: crimson/osd/ops_executer: revoke OpsExecuter::get_obc() X-Git-Tag: testing/wip-pdonnell-testing-20240920.212106-debug~37^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4ed5005148406db41f9398499e3532b6bf0ca53c;p=ceph-ci.git crimson/osd/ops_executer: revoke OpsExecuter::get_obc() Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index c06f6dd445a..d9281f7e4b6 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -572,10 +572,6 @@ OpsExecuter::flush_changes_n_do_ops_effects( template struct OpsExecuter::RollbackHelper { void rollback_obc_if_modified(const std::error_code& e); - ObjectContextRef get_obc() const { - assert(ox); - return ox->obc; - } seastar::lw_shared_ptr ox; Func func; }; diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 50f994805da..80879279b45 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1048,18 +1048,17 @@ PG::do_osd_ops_execute( std::move(log_entries)); }); }).safe_then_unpack_interruptible( - [success_func=std::move(success_func), rollbacker, this, failure_func_ptr] + [success_func=std::move(success_func), rollbacker, this, failure_func_ptr, obc] (auto submitted_fut, auto _all_completed_fut) mutable { auto all_completed_fut = _all_completed_fut.safe_then_interruptible_tuple( std::move(success_func), crimson::ct_error::object_corrupted::handle( - [rollbacker, this] (const std::error_code& e) mutable { + [rollbacker, this, obc] (const std::error_code& e) mutable { // this is a path for EIO. it's special because we want to fix the obejct // and try again. that is, the layer above `PG::do_osd_ops` is supposed to // restart the execution. rollbacker.rollback_obc_if_modified(e); - auto obc = rollbacker.get_obc(); return repair_object(obc->obs.oi.soid, obc->obs.oi.version ).then_interruptible([] {