swh.scrubber.storage_checker module#

Reads all objects in a swh-storage instance and recomputes their checksums.

swh.scrubber.storage_checker.postgresql_storage_db(storage)[source]#
swh.scrubber.storage_checker.get_datastore(storage) Datastore[source]#
class swh.scrubber.storage_checker.StorageChecker(db: ScrubberDb, config_id: int, storage: StorageInterface, limit: int = 0)[source]#

Bases: BasePartitionChecker

Reads a chunk of a swh-storage database, recomputes checksums, and reports errors in a separate database.

check_partition(object_type: ObjectType, partition_id: int) None[source]#

Abstract method that derived classes must implement to check objects in partition.

check_object_hashes(objects: Iterable[Revision | Release | Snapshot | Directory | Content])[source]#

Recomputes hashes, and reports mismatches.

check_object_references(objects: Iterable[Revision | Release | Snapshot | Directory | Content])[source]#

Check all objects references by these objects exist.