synology_apm_repo.sdk.units.verify_bucket_check module

The shared, self-free bucket-check core for verify_reachable, plus the multiprocess worker/executor glue built on top of it. Feeds into units.verify_reachable’s top-down walk, which runs this against every claimed bucket at either FULL or QUICK level (see VerifyLevel).

Everything below is module-level and takes every dependency as an explicit parameter, on purpose: _check_one_bucket_core is the one implementation both units.verify_reachable._ReachabilityWalker. _check_one_bucket (in-process) and _verify_bucket_worker (below, multiprocess) call — a worker process has no self (no _ReachabilityWalker instance at all, just its own freshly-rebuilt Pool/BucketReaderCache/ObjectStore), so the only way to guarantee both paths run the identical open→check→branch sequence is to give that sequence no self to begin with. The worker functions further down are module-level (never a method or closure — required for spawn picklability) and process-global rather than passed as arguments: each runs inside its own freshly-spawned worker process, one _verify_worker_init call per worker’s whole lifetime, so the Pool it builds (and that Pool’s own AllocationTableCache, when fingerprinting) persists across every bucket this worker ever checks — not rebuilt per task.

synology_apm_repo.sdk.units.verify_bucket_check.build_verify_executor(descriptor)

The one public factory for an executor this module’s own worker functions (above) know how to serve — for a caller (Repository.verify()’s own multi-catalog fan-out) that wants to share one executor across several verify_reachable() calls instead of letting each build (and tear down) its own. Kept here, not re-derived by that caller, so _verify_worker_init itself stays module-private: every executor this module’s workers can serve is built through this one function.