Skip to main content

Module snapshot_fetch

Module snapshot_fetch 

Source
Expand description

Pure reassembly state machine for a follower that fetches a KIP-630 snapshot over FetchSnapshot (api key 59).

This module is IO-free. The async engine (controller.rs) owns the transport and applies the SnapshotFetchStep that this module returns.

Chunks must arrive in order, that is, position must equal the number of bytes received so far. Any mismatch or a changed snapshot id aborts the transfer, so the engine restarts cleanly against the current leader.

Structs§

MetadataSnapshotFetchMax
Validated deployment limit for one metadata snapshot fetch.
SnapshotFetchState
In-flight reassembly of one snapshot from one leader.

Enums§

SnapshotFetchStep
What the engine should do after it feeds a chunk in.

Constants§

METADATA_SNAPSHOT_FETCH_HARD_MAX
Hard ceiling on the total bytes a follower will reassemble for one snapshot.

Type Aliases§

SnapshotId
Snapshot identity: (end_offset exclusive, epoch), as KIP-630 SnapshotId.