Skip to content

Commit 3202d9c

Browse files
committed
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 <[email protected]>
1 parent 127457a commit 3202d9c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/crimson/osd/pg.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ void PG::log_operation(
13881388

13891389
if (!is_primary()) { // && !is_ec_pg()
13901390
DEBUGDPP("on replica, clearing obc", *this);
1391-
replica_clear_repop_obc(logv);
1391+
clear_repop_obc(logv);
13921392
}
13931393
if (!logv.empty()) {
13941394
scrubber.on_log_update(logv.rbegin()->version);
@@ -1402,9 +1402,9 @@ void PG::log_operation(
14021402
false);
14031403
}
14041404

1405-
void PG::replica_clear_repop_obc(
1405+
void PG::clear_repop_obc(
14061406
const std::vector<pg_log_entry_t> &logv) {
1407-
LOG_PREFIX(PG::replica_clear_repop_obc);
1407+
LOG_PREFIX(PG::clear_repop_obc);
14081408
DEBUGDPP("clearing obc for {} log entries", *this, logv.size());
14091409
for (auto &&e: logv) {
14101410
DEBUGDPP("clearing entry for {} from: {} to: {}",

src/crimson/osd/pg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ class PG : public boost::intrusive_ref_counter<
675675
bool transaction_applied,
676676
ObjectStore::Transaction &txn,
677677
bool async = false);
678-
void replica_clear_repop_obc(
678+
void clear_repop_obc(
679679
const std::vector<pg_log_entry_t> &logv);
680680
void handle_rep_op_reply(const MOSDRepOpReply& m);
681681
interruptible_future<> do_update_log_missing(

src/osd/PrimaryLogPG.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ common::intrusive_timer &PrimaryLogPG::get_pg_timer()
552552
return osd->pg_timer;
553553
}
554554

555-
void PrimaryLogPG::replica_clear_repop_obc(
555+
void PrimaryLogPG::clear_repop_obc(
556556
const vector<pg_log_entry_t> &logv,
557557
ObjectStore::Transaction &t)
558558
{

src/osd/PrimaryLogPG.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,15 +535,15 @@ class PrimaryLogPG : public PG,
535535
projected_log.skip_can_rollback_to_to_head();
536536
projected_log.trim(cct, last->version, nullptr, nullptr, nullptr);
537537
}
538-
if (!is_primary() && !is_ec_pg()) {
539-
replica_clear_repop_obc(logv, t);
538+
if (!is_primary()) {
539+
clear_repop_obc(logv, t);
540540
}
541541
recovery_state.append_log(
542542
std::move(logv), trim_to, roll_forward_to, pg_committed_to,
543543
t, transaction_applied, async);
544544
}
545545

546-
void replica_clear_repop_obc(
546+
void clear_repop_obc(
547547
const std::vector<pg_log_entry_t> &logv,
548548
ObjectStore::Transaction &t);
549549

0 commit comments

Comments
 (0)