From 3202d9cb46f7ede3cd8a8a82f0f84758b9f36660 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 dd77f9601a1..d327aefaa92 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 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 d3a06e71412..0bab1375d65 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 e8623f780a4..b01472c09bb 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.47.3