Skip to main content

Module shipper

Module shipper 

Source
Expand description

WAL frame shipper — continuously reads new WAL frames and uploads them to object storage as segments.

§Sync loop

The run() method loops forever:

  1. Open the WAL file, find new frames since last sync
  2. Read frame data into a segment, upload to bucket
  3. Update the manifest with the new shipped frame count
  4. Check for manifest conflicts (remote ahead) — fatal if found

§Backoff

On error, exponential backoff from 0.1s to 30s max. ManifestConflict is fatal — the shipper breaks the loop and the tokio task exits. The process must restart after re-restore.

§Conflict resolution

Last-write-wins (no consensus). Two concurrent writers can both update the manifest; the later write overwrites the earlier. This is safe when only one node writes at a time (the typical embedded use case).

Structs§

FrameShipper