mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
crimson/osd: do not refence PGLog in BackfillState.
This commit makes the backfill code unware about pg log implementation details. The benefit is easier unit testing. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
parent
eaa1e967da
commit
670c433050
@ -35,9 +35,12 @@ struct BackfillState::PeeringFacade {
|
||||
return peering_state.get_info().log_tail;
|
||||
}
|
||||
|
||||
decltype(auto) get_pg_log() const {
|
||||
return peering_state.get_pg_log();
|
||||
template <class... Args>
|
||||
void scan_log_after(Args&&... args) const {
|
||||
peering_state.get_pg_log().get_log().scan_log_after(
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
bool is_backfill_target(pg_shard_t peer) const {
|
||||
return peering_state.is_backfill_target(peer);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void BackfillState::Enqueuing::maybe_update_range()
|
||||
primary_bi.version,
|
||||
pg().get_projected_last_update());
|
||||
logger().debug("{}: scanning pg log first", __func__);
|
||||
peering_state().get_pg_log().get_log().scan_log_after(primary_bi.version,
|
||||
peering_state().scan_log_after(primary_bi.version,
|
||||
[&](const pg_log_entry_t& e) {
|
||||
logger().debug("maybe_update_range(lambda): updating from version {}",
|
||||
e.version);
|
||||
|
Loading…
Reference in New Issue
Block a user