Skip to content

Commit b450989

Browse files
committed
Merge branch 'stack/requested-766' into stack/requested-761
2 parents 15a4b11 + 2903742 commit b450989

6 files changed

Lines changed: 37 additions & 15 deletions

File tree

‎control_plane/tests/issue754_level1.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn assert_selected_plan(name: &str, plan: &CompiledPhysicalPlan) -> Option<Strin
123123
for materialization in &plan.precompute_plan.materializations {
124124
let definition = plan
125125
.summary_catalog
126-
.materializations
126+
.definitions
127127
.get(&materialization.policy_fingerprint().into())
128128
.expect("precompute producer has no catalog definition");
129129
let descriptor =

‎crates/asap_types/src/derived_input.rs‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ impl DerivedInputIdentity {
3737
root: PostAsapNodeId,
3838
frontiers: &BTreeMap<PostAsapNodeId, SummaryDefinitionId>,
3939
) -> Result<Self, String> {
40-
if !matches!(
41-
document.schema_version,
42-
crate::executable_plan::OWNED_POST_ASAP_DAG_SCHEMA_VERSION
43-
| crate::executable_plan::MAINTENANCE_DAG_SCHEMA_VERSION
44-
) {
40+
if ![
41+
crate::executable_plan::OWNED_POST_ASAP_DAG_SCHEMA_VERSION,
42+
crate::executable_plan::MAINTENANCE_DAG_SCHEMA_VERSION,
43+
]
44+
.contains(&document.schema_version)
45+
{
4546
return Err("unsupported derived program document version".into());
4647
}
4748
let decoded = document.decode()?;

‎data_plane/examples/overhead/fixture.rs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ impl Fixture {
7878
let plan = physical_fixture::artifact_from_materializations(vec![config.clone()]);
7979
let store = Arc::new(SketchStore::new());
8080
store
81-
.install_summary_catalog(Arc::new(plan.summary_catalog.clone()))
81+
.install_precompute_plan(
82+
Arc::new(plan.summary_catalog.clone()),
83+
&plan.precompute_plan,
84+
)
8285
.map_err(anyhow::Error::msg)?;
8386
let skconfig = SketchConfig::DDSketch {
8487
relative_accuracy: 0.01,
8588
};
8689
store.register(SummarySeriesMetadata {
87-
sid: 1,
90+
storage_handle: 1,
8891
metric_name: "overhead_values".into(),
8992
group_by_keys: BTreeSet::new(),
9093
capability: Some(Capability::QuantileApprox(Some(SketchAlgorithm::DDSketch))),

‎data_plane/src/precompute_engine/subdag_scheduler.rs‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ where
114114
S: IdempotentCommitSink<V>,
115115
{
116116
let _span = tracing::debug_span!(target: "asap_runtime_debug", "precompute_dag",
117-
output_count = outputs.len(), node_count = dag.nodes.len(), edge_count = dag.edges.len()).entered();
117+
output_count = outputs.len(), node_count = dag.nodes.len(), edge_count = dag.edges.len())
118+
.entered();
118119
tracing::debug!(target: "asap_runtime_debug", "precompute DAG execution started");
119120
let mut unique = BTreeSet::new();
120121
for (node, key) in outputs {
@@ -211,7 +212,19 @@ where
211212
let node = nodes
212213
.get(&id)
213214
.ok_or_else(|| ScheduleError::Invalid(format!("missing node {id}")))?;
214-
let op = node.operator;
215+
let op = match &node.payload {
216+
ExecutableOperatorPayload::Fallback { .. } => "Fallback",
217+
ExecutableOperatorPayload::Binary { .. } => "Binary",
218+
ExecutableOperatorPayload::CandidateTopK { .. } => "CandidateTopK",
219+
ExecutableOperatorPayload::Value { .. } => "Value",
220+
ExecutableOperatorPayload::RelationalJoin { .. } => "RelationalJoin",
221+
ExecutableOperatorPayload::SummaryAgg { .. } => "SummaryAgg",
222+
ExecutableOperatorPayload::SummaryJoin { .. } => "SummaryJoin",
223+
ExecutableOperatorPayload::SummarySubtract => "SummarySubtract",
224+
ExecutableOperatorPayload::SummaryDelete { .. } => "SummaryDelete",
225+
ExecutableOperatorPayload::SummaryEstimate { .. } => "SummaryEstimate",
226+
ExecutableOperatorPayload::SummaryMerge => "SummaryMerge",
227+
};
215228
if node.output_state == ExecutionDataState::READ_ROWS {
216229
return Err(ScheduleError::Invalid(format!(
217230
"query-time node {id} in precompute dependency path"

‎data_plane/src/precompute_engine/worker.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ impl Worker {
570570
return Ok(());
571571
}
572572
let state = self.group_states.get_mut(&sid).unwrap();
573-
tracing::debug!(target: "asap_runtime_debug", worker_id = self.id, policy_fp = %agg_id,
573+
tracing::debug!(target: "asap_runtime_debug", worker_id = self.id, policy_fp = %policy_fp,
574574
"precompute update route resolved");
575575
#[cfg(not(test))]
576576
if state.program.is_none() {

‎data_plane/src/storage_engines/sketch_db/sds.rs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,11 @@ impl SummaryDescriptorRegistry {
158158
snapshot_sha256: reference.snapshot_sha256,
159159
});
160160
*self.authoritative_catalog.write().unwrap() = Some((catalog, generation, outputs));
161-
tracing::info!(plan_id = reference.plan_id, plan_version = reference.plan_version,
162-
"storage descriptor catalog installed");
161+
tracing::info!(
162+
plan_id = reference.plan_id,
163+
plan_version = reference.plan_version,
164+
"storage descriptor catalog installed"
165+
);
163166
Ok(())
164167
}
165168

@@ -265,8 +268,10 @@ impl SummaryDescriptorRegistry {
265268
}
266269
};
267270

268-
let catalog_generation = authoritative.as_ref().map(|(_, generation, _)| generation.clone());
269-
tracing::debug!(target: "asap_runtime_debug", sid = metadata.sid,
271+
let catalog_generation = authoritative
272+
.as_ref()
273+
.map(|(_, generation, _)| generation.clone());
274+
tracing::debug!(target: "asap_runtime_debug", sid = metadata.storage_handle,
270275
policy_fp = %metadata.policy_fp,
271276
summary_descriptor_hash = format_args!("{:016x}", xxhash_rust::xxh64::xxh64(summary_descriptor.id().canonical().as_bytes(), 0)),
272277
data_descriptor_hash = format_args!("{:016x}", xxhash_rust::xxh64::xxh64(data_id.canonical().as_bytes(), 0)),

0 commit comments

Comments
 (0)