pub(crate) async fn partially_truncate_status_history<T, K>(
id: GlobalId,
introspection_type: IntrospectionType,
write_handle: &mut WriteHandle<SourceData, (), T, Diff>,
status_history_desc: StatusHistoryDesc<K>,
now: NowFn,
storage_collections: &Arc<dyn StorageCollections<Timestamp = T> + Send + Sync>,
txns_read: &TxnsRead<T>,
persist: &Arc<PersistClientCache>,
) -> BTreeMap<K, Row>
Expand description
Effectively truncates the status history shard based on its retention policy.
NOTE: The history collections are really append-only collections, but
every-now-and-then we want to retract old updates so that the collection
does not grow unboundedly. Crucially, these are not incremental
collections, they are not derived from a state at some time t
and we
cannot maintain a desired state for them.
Returns a map with latest unpacked row per key.