Skip to main content

shard_source

Function shard_source 

Source
pub fn shard_source<'g, K, V, T, D, DT, G, C>(
    scope: &mut Child<'g, G, T>,
    name: &str,
    client: impl Fn() -> C,
    shard_id: ShardId,
    as_of: Option<Antichain<G::Timestamp>>,
    snapshot_mode: SnapshotMode,
    until: Antichain<G::Timestamp>,
    desc_transformer: Option<DT>,
    key_schema: Arc<K::Schema>,
    val_schema: Arc<V::Schema>,
    filter_fn: impl FnMut(&PartStats, AntichainRef<'_, G::Timestamp>) -> FilterResult + 'static,
    listen_sleep: Option<impl Fn() -> RetryParameters + 'static>,
    start_signal: impl Future<Output = ()> + 'static,
    error_handler: ErrorHandler,
) -> (StreamVec<Child<'g, G, T>, FetchedBlob<K, V, G::Timestamp, D>>, Vec<PressOnDropButton>)
Expand description

Creates a new source that reads from a persist shard, distributing the work of reading data to all timely workers.

All times emitted will have been advanced by the given as_of frontier. All updates at times greater or equal to until will be suppressed. The map_filter_project argument, if supplied, may be partially applied, and any un-applied part of the argument will be left behind in the argument.

The desc_transformer interposes an operator in the stream before the chosen data is fetched. This is currently used to provide flow control… see usages for details.