library_maintenance: clarify orphan-gc log wording

"marked 2 new" parses as "2 new files" on first read — but the
unit is content_hashes, and the action is observing them as
orphaned (becoming-deleted, not appearing). Reword:

  "{} new orphan hash(es) marked, {} revived"

instead of "marked {} new, revived {}". Also pluralize the deleted
counts ("row(s)") and append the pending-set size to the success
log so a tick that both deletes and re-marks doesn't lose the
trailing-state context.

No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cameron Cordes
2026-05-01 18:01:01 +00:00
parent fa98d147be
commit d809ddee44

View File

@@ -371,7 +371,7 @@ pub fn run_orphan_gc(
state.prev_tick_all_online = false;
if stats.changed() {
info!(
"orphan-gc: marked {} new, revived {} (deferred — at least one library Stale; pending: {})",
"orphan-gc: {} new orphan hash(es) marked, {} revived (deferred — at least one library Stale; pending: {})",
stats.newly_marked,
stats.revived,
state.pending.len()
@@ -429,12 +429,13 @@ pub fn run_orphan_gc(
if stats.changed() {
info!(
"orphan-gc: marked {} new, revived {}; deleted {} face_detections / {} tagged_photo / {} photo_insights",
"orphan-gc: {} new orphan hash(es) marked, {} revived; deleted {} face_detections / {} tagged_photo / {} photo_insights row(s) (pending: {})",
stats.newly_marked,
stats.revived,
stats.deleted_face_detections,
stats.deleted_tagged_photo,
stats.deleted_photo_insights,
state.pending.len(),
);
} else {
debug!("orphan-gc: no changes this tick (pending: {})", state.pending.len());