Skip to main content

Module live_post_bundle_manager

Module live_post_bundle_manager 

Source
Expand description

§Production PostBundleManager — cache, fetch, heal

The real implementation of crate::client::post_bundle::post_bundle_manager::PostBundleManager used in production. Lookup proceeds in three stages:

  1. Cache — check BUCKET_POST_BUNDLE in crate::client::client_storage::client_storage::ClientStorage. Serve hot entries immediately; serve stale entries only if the bundle is already sealed.
  2. Network — otherwise walk peers closest to the bucket’s location id via a crate::client::peer_tracker::peer_iterator::PeerIterator and issue GetPostBundleV1 RPCs, gated by the crate::client::caching::cache_radius_tracker to avoid re-hammering already-cached peers. Concurrent lookups for the same (location, time) are de-duplicated via a per-key Mutex so only one RPC actually goes out.
  3. Heal — if multiple peers return divergent bundles, spawn crate::client::post_bundle::post_bundle_healing in the background to reconcile them.

Structs§

LivePostBundleManager
The production PostBundleManager implementation — the one that actually talks to the network.