Skip to content

Commit ab8609c

Browse files
committed
crimson/osd: Logging fixes
* Fix "failed to log message" * PGRecovery move to new logging macro * PGRecovery to print pg prefix as it's impossible to debug specific pg recovery ops without it. Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 314d2e7)
1 parent 6f8c340 commit ab8609c

File tree

4 files changed

+81
-73
lines changed

4 files changed

+81
-73
lines changed

src/crimson/osd/backfill_state.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void BackfillState::Enqueuing::maybe_update_range()
122122
ceph_assert(primary_bi.version == eversion_t());
123123
return;
124124
}
125-
DEBUGDPP("{}: bi is old, ({}) can be updated with log to {}",
125+
DEBUGDPP("bi is old, ({}) can be updated with log to {}",
126126
pg(),
127127
primary_bi.version,
128128
pg().get_projected_last_update());
@@ -183,9 +183,9 @@ void BackfillState::Enqueuing::maybe_update_range()
183183
}
184184
}
185185
};
186-
DEBUGDPP("{}: scanning pg log first", pg());
186+
DEBUGDPP("scanning pg log first", pg());
187187
peering_state().scan_log_after(primary_bi.version, func);
188-
DEBUGDPP("{}: scanning projected log", pg());
188+
DEBUGDPP("scanning projected log", pg());
189189
pg().get_projected_log().scan_log_after(primary_bi.version, func);
190190
primary_bi.version = pg().get_projected_last_update();
191191
} else {

src/crimson/osd/pg.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ void PG::on_active_actmap()
630630
publish_stats_to_osd();
631631
});
632632
} else {
633-
logger().debug("{}: pg not clean, skipping snap trim");
633+
logger().debug("pg not clean, skipping snap trim");
634634
ceph_assert(!peering_state.state_test(PG_STATE_SNAPTRIM));
635635
}
636636
}

src/crimson/osd/pg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class PG : public boost::intrusive_ref_counter<
309309
LOG_PREFIX(PG::request_remote_recovery_reservation);
310310
SUBDEBUGDPP(
311311
osd, "priority {} on_grant {} on_preempt {}",
312-
*this, on_grant->get_desc(), on_preempt->get_desc());
312+
*this, priority, on_grant->get_desc(), on_preempt->get_desc());
313313
shard_services.remote_request_reservation(
314314
orderer,
315315
pgid,

0 commit comments

Comments
 (0)