httk.store.db.fsck

Integrity repair and dependency collection for SQL permanentization stores.

Classes

FsckTableSummary

Counters for one physical record, child, or dispatch table.

FsckSummary

Immutable SQL fsck report, modeled after Mongo's public summary.

Functions

run_fsck(store, *[, repair, collect_garbage, ...])

Repair dispatches, sweep incomplete residue, and report logical dangling references.

Module Contents

class httk.store.db.fsck.FsckTableSummary[source]

Counters for one physical record, child, or dispatch table.

examined: int = 0[source]
repaired: int = 0[source]
conflicts: int = 0[source]
deleted: int = 0[source]
class httk.store.db.fsck.FsckSummary[source]

Immutable SQL fsck report, modeled after Mongo’s public summary.

tables: collections.abc.Mapping[str, FsckTableSummary][source]
violations: tuple[str, Ellipsis][source]
httk.store.db.fsck.run_fsck(store, *, repair=True, collect_garbage=True, repair_conflicts=False, known_types=(), exclusive=False)[source]

Repair dispatches, sweep incomplete residue, and report logical dangling references.

DuckDB does not serialize a read-then-delete fsck against concurrent writers. Callers must therefore pass exclusive=True there, explicitly acknowledging that they have taken the database offline from all writers. SQLite transactional stores instead issue BEGIN IMMEDIATE themselves.