Skip to main content

Module inspect

Module inspect 

Source
Expand description

CLI introspection tools for persist

StructsΒ§

BatchPartOutput πŸ”’
BatchPartUpdate πŸ”’
BlobArgs
Arguments for commands that run only against the blob store.
BlobAuditReport πŸ”’
BlobBatchPartArgs
Arguments for viewing contents of a batch part
BlobCounts πŸ”’
FrontierAuditReport πŸ”’
InspectArgs
Commands for read-only inspection of persist state
K πŸ”’
The following is a very terrible hack that no one should draw inspiration from. Currently State is generic over <K, V, T, D>, with KVD being represented as phantom data for type safety and to detect persisted codec mismatches. However, reading persisted States does not require actually decoding KVD, so we only need their codec names to match, not the full types. For the purposes of persistcli inspect, which only wants to read the persistent data, we create new types that return static Codec names, and rebind the names if/when we get a CodecMismatch, so we can convince the type system and our safety checks that we really can read the data.
LiveShard πŸ”’
O πŸ”’
StateRollupArgs
Arguments for viewing the state rollup of a shard
UnreferencedBlobs πŸ”’
V πŸ”’

EnumsΒ§

Command πŸ”’
Individual subcommands of inspect
Loaded πŸ”’
What a load of shard state found. The loads of StateVersions retry a missing rollup indefinitely, which would hide data loss.

StaticsΒ§

FAKE_OPAQUE_CODEC πŸ”’
KVTD_CODECS πŸ”’

FunctionsΒ§

add_part πŸ”’
audit_blobs πŸ”’
Checks every batch part, hollow run and rollup referenced at or above seqno_since without taking a read hold that would prevent GC.
audit_frontiers πŸ”’
Reads the controller’s critical since (or the shard since if unregistered) and the export bootstrap state without taking a read hold.
blob_batch_part
Fetches the updates in a blob batch part
blob_counts
Fetches the blob count for given path
blob_usage
Returns information about blob usage for a shard
confirmed πŸ”’
Rollup keys are never re-added. A key still referenced and missing on a second load could not have been deleted by a concurrent GC.
consolidated_size πŸ”’
fetch_latest_state
Fetches the current state of a given shard
fetch_state_diffs
Fetches each state in a shard
fetch_state_rollup
Fetches a state rollup of a given shard. If the seqno is not provided, choose the latest; if the rollup id is not provided, discover it by inspecting state.
fetch_state_rollups
Fetches the state from all known rollups of a given shard
load_head πŸ”’
Reconstructs the head of consensus from the diffs since its latest rollup.
load_live_shard πŸ”’
Reconstructs the endpoints of a single consensus scan.
referenced_blobs πŸ”’
The key of every blob that a state version at or above seqno_since references, including the parts of hollow runs.
run
Runs the given read-only inspect command.
shard_stats
Rummages through S3 to find the latest rollup for each shard, then calculates summary stats.
unreferenced_blobs
Fetches the unreferenced blobs for given environment