@@ -548,7 +548,6 @@ OpsExecuter::flush_changes_n_do_ops_effects(
548548template <class Func >
549549struct OpsExecuter ::RollbackHelper {
550550 void rollback_obc_if_modified ();
551- void rollback_obc_if_modified (const std::error_code& e);
552551 OpsExecuter *ox;
553552 Func func;
554553};
@@ -587,36 +586,6 @@ void OpsExecuter::RollbackHelper<Func>::rollback_obc_if_modified()
587586 }
588587}
589588
590- template <class Func >
591- void OpsExecuter::RollbackHelper<Func>::rollback_obc_if_modified(
592- const std::error_code& e)
593- {
594- // Oops, an operation had failed. do_osd_ops() altogether with
595- // OpsExecuter already dropped the ObjectStore::Transaction if
596- // there was any. However, this is not enough to completely
597- // rollback as we gave OpsExecuter the very single copy of `obc`
598- // we maintain and we did it for both reading and writing.
599- // Now all modifications must be reverted.
600- //
601- // The conditional's purpose is to efficiently handle hot errors
602- // which may appear as a result of e.g. CEPH_OSD_OP_CMPXATTR or
603- // CEPH_OSD_OP_OMAP_CMP. These are read-like ops and clients
604- // typically append them before any write. If OpsExecuter hasn't
605- // seen any modifying operation, `obc` is supposed to be kept
606- // unchanged.
607- assert (ox);
608- const auto need_rollback = ox->has_seen_write ();
609- crimson::get_logger (ceph_subsys_osd).debug (
610- " {}: object {} got error {}, need_rollback={}" ,
611- __func__,
612- ox->obc ->get_oid (),
613- e,
614- need_rollback);
615- if (need_rollback) {
616- func (ox->obc );
617- }
618- }
619-
620589// PgOpsExecuter -- a class for executing ops targeting a certain PG.
621590class PgOpsExecuter {
622591 template <typename T = void >
0 commit comments