synology_apm_repo.sdk.dedup.redundancy_repair module

Self-repair of a CRC-mismatched region from its on-disk Redundancy trailer (FORMAT-SPEC.md: ChunkCrcStore & Redundancy): fetch the trailer, then run format.redundancy.attempt_repair off the event loop.

async synology_apm_repo.sdk.dedup.redundancy_repair.repair_via_trailer(data, *, coverage, expected_crc, fetch_trailer)

Fetch the trailer via fetch_trailer (already bound to the record’s or bucket’s trailer offset) and hand it to attempt_repair, which runs on a worker thread so a large array doesn’t stall the event loop.

Returns:

attempt_repair’s result, or None if fetch_trailer raises NotFoundError/FormatError.

Return type:

bytes | None