MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / fetch

Method fetch

src/persist-client/src/fetch.rs:1231–1268  ·  view source on GitHub ↗
(
        cfg: &FetchConfig,
        shard_id: &ShardId,
        blob: &dyn Blob,
        metrics: &Metrics,
        shard_metrics: &ShardMetrics,
        read_metrics: &ReadMetrics,
        registere

Source from the content-addressed store, hash-verified

1229 T: Timestamp + Lattice + Codec64,
1230{
1231 pub async fn fetch(
1232 cfg: &FetchConfig,
1233 shard_id: &ShardId,
1234 blob: &dyn Blob,
1235 metrics: &Metrics,
1236 shard_metrics: &ShardMetrics,
1237 read_metrics: &ReadMetrics,
1238 registered_desc: &Description<T>,
1239 part: &BatchPart<T>,
1240 ) -> Result<Self, BlobKey> {
1241 match part {
1242 BatchPart::Hollow(x) => {
1243 fetch_batch_part(
1244 cfg,
1245 shard_id,
1246 blob,
1247 metrics,
1248 shard_metrics,
1249 read_metrics,
1250 registered_desc,
1251 x,
1252 )
1253 .await
1254 }
1255 BatchPart::Inline {
1256 updates,
1257 ts_rewrite,
1258 ..
1259 } => Ok(EncodedPart::from_inline(
1260 cfg,
1261 metrics,
1262 read_metrics.clone(),
1263 registered_desc.clone(),
1264 updates,
1265 ts_rewrite.as_ref(),
1266 )),
1267 }
1268 }
1269
1270 pub(crate) fn from_inline(
1271 cfg: &FetchConfig,

Callers 2

apiRequestMethod · 0.45
disableRegionMethod · 0.45

Calls 3

fetch_batch_partFunction · 0.85
cloneMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected