synology_apm_repo.sdk.units.verify_reachable module

verify_reachable(): the top-down, reachability-scoped integrity check behind Repository.verify()/Catalog.verify(). See ARCHITECTURE.md’s Dedup Layer section for what FULL and QUICK check.

Walks Catalog → Workload → Version → each version’s composition record(s) (units.verify_extents) and checks only data reachable that way; dedup.verify_walk.ReachabilitySweep checks those records and every (stream_id, bucket_id) they touch, once, whole.

Callers check the key first (Repository.verify/Catalog.verify do): an encrypted repository run without a key reports a misleadingly clean result.

Not checked: link.key ↔ repo_state.link_key (APV) consistency; any DB beyond the ones this walk queries; dangling buckets (in Pool/ but unreferenced by any live version), which need a full Pool/ listing rather than a catalog-driven walk.

async synology_apm_repo.sdk.units.verify_reachable.verify_reachable(repo, level=VerifyLevel.QUICK, *, progress=None, executor=None, tuning=None)

Run the top-down, reachability-scoped check and return every Finding — see VerifyLevel for what level controls and VerifyTuning for tuning (default VerifyTuning()).

progress reports two phases: phase="discovering" (one tick per (workload, version) pair) then phase="verifying" (one tick per bucket checked, unit "bytes" at FULL or "buckets" at QUICK). Progress.detail names the "workload/version" the item belongs to.

A failure listing connections, workloads or versions becomes a Finding; the failing item is skipped and its siblings still checked.

executor is FULL’s process pool, caller-owned when given (to share one across calls) and built for repo; None builds one only if needed and shuts it down before returning. QUICK never uses it.

Raises:
  • ValueError – executor was built for another repository.

  • StorageBackendError – A store call failed; a transport failure says nothing about the data, so it aborts the check.