}
// actors
- void add(const pg_log_entry_t& e, enum NonPrimary nonprimary, bool applied) {
+ void add(const pg_log_entry_t& e, enum NonPrimary nonprimary, bool applied, pg_info_t *info, LogEntryHandler *h) {
if (!applied) {
if (!nonprimary) {
ceph_assert(get_can_rollback_to() == head);
}
if (!applied) {
- skip_can_rollback_to_to_head();
+ skip_can_rollback_to_to_head(info, h);
}
} // add
// nonprimary and applied must either both be provided or neither. If
// neither is provided applied = true and the nonprimary is irrelevant.
void add(const pg_log_entry_t& e) {
- add(e, NonPrimaryFalse, true);
+ add(e, NonPrimaryFalse, true, nullptr, nullptr);
}
void trim(
void unindex() { log.unindex(); }
- void add(const pg_log_entry_t& e, enum NonPrimary nonprimary, bool applied) {
+ void add(const pg_log_entry_t& e, enum NonPrimary nonprimary, bool applied, pg_info_t *info, LogEntryHandler *h) {
mark_writeout_from(e.version);
- log.add(e, nonprimary, applied);
+ log.add(e, nonprimary, applied, info, h);
}
void add(const pg_log_entry_t& e) {
- add(e, NonPrimaryFalse, true);
+ add(e, NonPrimaryFalse, true, nullptr, nullptr);
}
void reset_recovery_pointers() { log.reset_recovery_pointers(); }
}
}
-void PeeringState::add_log_entry(const pg_log_entry_t& e, bool applied)
+void PeeringState::add_log_entry(const pg_log_entry_t& e, ObjectStore::Transaction &t, bool applied)
{
// raise last_complete only if we were previously up to date
if (info.last_complete == info.last_update)
// log mutation
enum PGLog::NonPrimary nonprimary{pool.info.is_nonprimary_shard(info.pgid.shard)};
- pg_log.add(e, nonprimary, applied);
+ PGLog::LogEntryHandlerRef handler{pl->get_log_handler(t)};
+ pg_log.add(e, nonprimary, applied, &info, handler.get());
psdout(10) << "add_log_entry " << e << dendl;
}
}
for (auto p = logv.begin(); p != logv.end(); ++p) {
- add_log_entry(*p, transaction_applied);
+ add_log_entry(*p, t, transaction_applied);
/* We don't want to leave the rollforward artifacts around
* here past last_backfill. It's ok for the same reason as
void update_blocked_by();
void update_calc_stats();
- void add_log_entry(const pg_log_entry_t& e, bool applied);
+ void add_log_entry(const pg_log_entry_t& e, ObjectStore::Transaction &t, bool applied);
void calc_trim_to();
void calc_trim_to_aggressive();