Expand description
Everything the worker reads from the store directory, as blocking calls.
The worker runs each of these on Tokio’s blocking pool
(tokio::task::spawn_blocking), never on a runtime thread: a segment
read can be 64 MiB, and a side file grows with the store’s history.
Structs§
- Disk
State - What one look at the store directory says.
- Parent
Record - What
PARENT_FILEholds.
Constants§
- LINEAGE_
FILE - The store file naming the backup lineage it belongs to.
- PARENT_
FILE - The store file a restore-on-boot writes: which lineage and restore point the store was restored from. Never uploaded (it is not a side file).
Functions§
- crc32_
of - CRC-32 of a whole file, read from its start; the file is left at its start again.
- create_
lineage - Give the store the backup lineage
id: written to a temporary file, fsynced, renamed into place, and the directory fsynced. The one file the backup worker ever writes into a store directory. - create_
parent - Write
PARENT_FILEascreate_lineagewrites the lineage: a temporary file, fsynced, renamed into place, the directory fsynced. - floor
- The store’s horizon floor (
wal.floor), or 0. - ident_
of Identof a file’s metadata, computed as the engine computes it.- local_
archives - Every
wal.N.archivein the directory, as(n, len), sorted byn. - observe
- open_
snapshot snapshot.binopened, with the identity of the file actually opened.- read_
lineage - The store’s backup lineage, or
Nonewhen it has never been backed up. - read_
parent - The store’s parent record, or
Nonewhen it has none (or one that does not parse: it then adopts nothing). - read_
side - A side file’s identity, and its bytes when the identity differs from
known.Ok(None)when the file does not exist.
Type Aliases§
- Ident
- A file’s identity as
(len, mtime_nanos)— the form the engine uses forsnapshot.bin(mushroomdb::WalPosition::snapshot).