synology_apm_repo.sdk.findings module¶
The value types of a verify run: the VerifyLevel and
VerifyTuning it runs with, and each Finding it reports, classified
by Stage/Symptom. Plain data,
shared by the checks that produce findings (dedup/, units/), the
facade that returns them (api/) and their rendering
(presentation.verify_report).
- class synology_apm_repo.sdk.findings.Symptom(*values)¶
Bases:
EnumThe symptom categories a finding can carry.
- CORRUPTION = 'Corruption'¶
- FILE_MISSING = 'FileMissing'¶
- MISMATCH = 'Mismatch'¶
- DATA_MISSING = 'DataMissing'¶
- KEY_MISSING = 'KeyMissing'¶
- REPAIRED_VIA_PARITY = 'RepairedViaParity'¶
A CRC mismatch that Redundancy-blob self-repair (
format.redundancy.attempt_repair) reconstructed and confirmed correct. Still reported: repeated repairs signal failing storage.
- class synology_apm_repo.sdk.findings.VerifyLevel(*values)¶
Bases:
EnumHow thorough a
verifyrun is.FULLreads every live chunk in a touched bucket and checks its ciphertext CRC32 and, unless the bucket is encrypted and no vault key was given, its decrypt+decompress+SHA-256 fingerprint: as costly as exporting the whole repository.QUICKreads no chunk content, only each touched bucket’s structural checks.- QUICK = 'quick'¶
- FULL = 'full'¶
- class synology_apm_repo.sdk.findings.VerifyTuning(max_concurrent_reads=16, max_concurrent_decodes=4)¶
Bases:
objectHow a
verifyrun spreads its reads; the defaults suit most stores.- Variables:
max_concurrent_reads (int) – Buckets checked, and at FULL level sized, at once in this process. A QUICK check or a FULL sizing is a few small reads: several hide a remote store’s latency; past what the store itself serves, more only add latency.
max_concurrent_decodes (int) – Of those, FULL checks at once, each holding one read plus 4 MiB of plaintext: bounds this process’s memory. Not applied to FULL checks in worker processes (one bucket each), which run whenever the store can be reopened in one.
- Raises:
ValueError –
max_concurrent_readsormax_concurrent_decodesis less than 1.
- class synology_apm_repo.sdk.findings.Stage(*values)¶
Bases:
StrEnumThe stages a
Findingcan come from; astrsubclass, soFinding.stagerenders and serializes as its value.- REPO_INFO = 'RepoInfo'¶
- FILE_MAP = 'FileMap'¶
- COMPOSITION = 'Composition'¶
- BUCKET = 'Bucket'¶
- ENCRYPT_KEY = 'EncryptKey'¶
- VERSION = 'Version'¶
A catalog/workload/version whose metadata says it should resolve to content but doesn’t, at the version or the workload/connection enumeration level.
- class synology_apm_repo.sdk.findings.Finding(stage, symptom, path, detail, ref=None)¶
Bases:
objectOne integrity-check result.
pathis whatever store-relative path (orfile_mappath, or workload/version display info, for aStage.VERSIONfinding) the finding is about.ref(Noneunless set) is a canonicalrepo_path#@cat:<id>/wl:<id>/ver:<uid>ref (units.node_ref.NodeRef) naming the catalog/workload/version being checked, set by the reachability walk. For data shared by several versions through dedup, it names the first version whose check hit the finding; later versions sharing the checked data add none.