Expand description
Re-announcing held manifests after a sync epoch change (#781).
When the feed answers a cursor with 409 error.sync.cursor_stale
(SyncError::is_stale_cursor), the server rebuilt this
library’s index and may have lost rows. The client resyncs from zero, and then every asset it
holds that the resynced feed does not list is re-announced: its chain-head provenance
record goes to POST /v1/sync/reannounce, manifests only, never bytes
(Server Filesystem § Sync Epoch and Client Re-Announce).
Two pieces, so the orchestration is testable without a server:
unlistedis the pure walk: the held assets the feed does not list, in the order held;batchescuts them into requests the server accepts, by count and by size;SyncConsumer::reannouncesends one batch through the generated operation.
reannounce_unlisted is the three together. What the server answers is per manifest: a
missing_blobs answer is the caller’s cue to re-upload through the transfer protocol, which
is the push path’s to do, never this module’s.
Structs§
- Held
Manifest - One asset the client holds: its id and its chain head’s provenance record, the exact bytes
an upload sends as the
provenanceblob. - Reannounce
Result - One manifest’s answer.
Enums§
- Reannounce
Outcome - What the server did with one re-announced manifest.
Constants§
- MAX_
BATCH_ BYTES - The most manifest bytes one request carries, before base64.
- MAX_
BATCH_ MANIFESTS - The most manifests one request carries: half the server’s per-request ceiling, so a server that lowers it within reason still accepts a full batch.
Functions§
- batches
- Cut
manifestsinto requests of at mostMAX_BATCH_MANIFESTSmanifests andMAX_BATCH_BYTESbytes, in order. - reannounce_
unlisted - Re-announce every held asset
listeddoes not name, batch by batch, and return each answer paired with the asset the client sent it for. - unlisted
- The held assets
listeddoes not name, in the order held: what to re-announce.