From: Alex Ainscow Date: Fri, 3 Oct 2025 13:51:23 +0000 (+0100) Subject: osd: Call clear_repop_obc for EC as well as Replica. X-Git-Tag: v21.0.0~385^2~1^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3202d9cb46f7ede3cd8a8a82f0f84758b9f36660;p=ceph.git osd: Call clear_repop_obc for EC as well as Replica. This function is necessary for balanced reads and as such is required for EC too. Rename the function to make sense, given this change of purpose, but the functionality does not change. Signed-off-by: Alex Ainscow --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index dd77f9601a1f..d327aefaa925 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1388,7 +1388,7 @@ void PG::log_operation( if (!is_primary()) { // && !is_ec_pg() DEBUGDPP("on replica, clearing obc", *this); - replica_clear_repop_obc(logv); + clear_repop_obc(logv); } if (!logv.empty()) { scrubber.on_log_update(logv.rbegin()->version); @@ -1402,9 +1402,9 @@ void PG::log_operation( false); } -void PG::replica_clear_repop_obc( +void PG::clear_repop_obc( const std::vector &logv) { - LOG_PREFIX(PG::replica_clear_repop_obc); + LOG_PREFIX(PG::clear_repop_obc); DEBUGDPP("clearing obc for {} log entries", *this, logv.size()); for (auto &&e: logv) { DEBUGDPP("clearing entry for {} from: {} to: {}", diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 9db370a8887f..b13299f94a1b 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -675,7 +675,7 @@ public: bool transaction_applied, ObjectStore::Transaction &txn, bool async = false); - void replica_clear_repop_obc( + void clear_repop_obc( const std::vector &logv); void handle_rep_op_reply(const MOSDRepOpReply& m); interruptible_future<> do_update_log_missing( diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d3a06e714125..0bab1375d650 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -552,7 +552,7 @@ common::intrusive_timer &PrimaryLogPG::get_pg_timer() return osd->pg_timer; } -void PrimaryLogPG::replica_clear_repop_obc( +void PrimaryLogPG::clear_repop_obc( const vector &logv, ObjectStore::Transaction &t) { diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index e8623f780a48..b01472c09bbb 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -535,15 +535,15 @@ public: projected_log.skip_can_rollback_to_to_head(); projected_log.trim(cct, last->version, nullptr, nullptr, nullptr); } - if (!is_primary() && !is_ec_pg()) { - replica_clear_repop_obc(logv, t); + if (!is_primary()) { + clear_repop_obc(logv, t); } recovery_state.append_log( std::move(logv), trim_to, roll_forward_to, pg_committed_to, t, transaction_applied, async); } - void replica_clear_repop_obc( + void clear_repop_obc( const std::vector &logv, ObjectStore::Transaction &t);