From 69a6bd76bb3b4abbbacec156aaab6d3a90cb60eb Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Fri, 3 Oct 2025 14:51:23 +0100 Subject: [PATCH] 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 --- src/crimson/osd/pg.cc | 6 +++--- src/crimson/osd/pg.h | 2 +- src/osd/PrimaryLogPG.cc | 2 +- src/osd/PrimaryLogPG.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 3c814d9d37e..30f3e34b713 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1377,7 +1377,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); @@ -1391,9 +1391,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 9db370a8887..b13299f94a1 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 3e5de805cdf..2df144fcfd0 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 15d50b1e2ee..2c3d5c553f5 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); -- 2.39.5