Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions control_plane/src/emit/asapquery_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ fn _type_check(_: &AgentCollectorConfig) {}
mod tests {
use super::*;
use crate::types::{
AgentDataSink, BackendCollectorConfig, CollectionPlan, DeltaDecision,
GatewayCollectorConfig, OutputMode, ProcessorMode, SketchParams, TransmissionCostSummary,
AgentDataSink, CollectionPlan, DeltaDecision, GatewayCollectorConfig, OutputMode,
ProcessorMode, SketchParams, TransmissionCostSummary,
};
use std::time::Duration;

Expand All @@ -191,10 +191,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: sketch_type,
group_by: vec![],
},
precompute: vec![],
valid_until: chrono::Utc::now() + chrono::Duration::seconds(300),
delta_decision: DeltaDecision::default(),
Expand Down
13 changes: 4 additions & 9 deletions control_plane/src/metrics_exposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,15 @@ impl MetricsRegistry {
// a label value, doesn't need to be cryptographic.
let mut hasher = DefaultHasher::new();
// Cover the fields the planner actually changes per
// re-plan: agent sketch+mode+delta, backend merge+group_by,
// and valid_until (to catch refresh-only re-plans).
// re-plan: agent sketch+mode+delta+grouping, and valid_until
// (to catch refresh-only re-plans).
format!(
"{:?}|{:?}|{:?}|{:?}|{:?}|{:?}|{:?}",
"{:?}|{:?}|{:?}|{:?}|{:?}|{:?}",
plan.agent_config.sketch_type,
plan.agent_config.mode,
plan.agent_config.delta_transmission,
plan.agent_config.window_duration,
plan.backend_config.merge_sketch_type,
plan.backend_config.group_by,
plan.agent_config.aggregate_by,
plan.valid_until,
)
.hash(&mut hasher);
Expand Down Expand Up @@ -451,10 +450,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: sketch,
group_by: vec![],
},
precompute: vec![],
valid_until: Utc::now() + chrono::Duration::seconds(valid_secs),
delta_decision: Default::default(),
Expand Down
4 changes: 0 additions & 4 deletions control_plane/src/optimizer/cost/delta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: st,
group_by: vec![],
},
precompute: vec![],
valid_until: Utc::now(),
delta_decision: DeltaDecision::default(),
Expand Down
6 changes: 0 additions & 6 deletions control_plane/src/optimizer/cost/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ impl CostModelPlanner {
plan.agent_config.sketch_params = params;
plan.agent_config.mode = mode;
plan.agent_config.window_duration = window_duration;
plan.backend_config.merge_sketch_type = st.clone();
apply_delta_decision_with(&mut plan, w, wc, &table);
return plan;
}
Expand All @@ -269,7 +268,6 @@ impl CostModelPlanner {
trial.agent_config.sketch_params = params;
trial.agent_config.mode = mode;
trial.agent_config.window_duration = window_duration;
trial.backend_config.merge_sketch_type = st;

let s = score_with(&trial, w, &table);
if !s.meets_sla {
Expand Down Expand Up @@ -1041,10 +1039,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: st,
group_by: vec![],
},
precompute: vec![],
valid_until: Utc::now(),
delta_decision: DeltaDecision::default(),
Expand Down
1 change: 0 additions & 1 deletion control_plane/src/optimizer/cost/pareto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ pub fn pareto_frontier(
plan.agent_config.sketch_params = params;
plan.agent_config.mode = mode;
plan.agent_config.window_duration = window_duration;
plan.backend_config.merge_sketch_type = st.clone();

// Apply delta decision using the cost table.
apply_delta(st.clone(), &mut plan, workload, wc, &table);
Expand Down
20 changes: 0 additions & 20 deletions control_plane/src/optimizer/rules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,6 @@ impl RulesPlanner {
.collect();
label_matchers.sort();

let backend_sketch = sketch_type.clone();
let group_by = aggregate_by.clone();

let valid_until = Utc::now() + chrono::Duration::seconds(self.valid_for.as_secs() as i64);

CollectionPlan {
Expand All @@ -371,10 +368,6 @@ impl RulesPlanner {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: backend_sketch,
group_by,
},
precompute: vec![],
valid_until,
delta_decision: DeltaDecision::default(),
Expand Down Expand Up @@ -414,10 +407,6 @@ impl RulesPlanner {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: SketchType::DDSketch,
group_by: vec![],
},
precompute: vec![],
valid_until,
delta_decision: DeltaDecision::default(),
Expand Down Expand Up @@ -583,15 +572,6 @@ mod tests {
);
}

#[test]
fn backend_config_matches_sketch_type() {
let plan = RulesPlanner::new().plan(&workload(vec![AggType::Quantile]));
assert_eq!(
plan.backend_config.merge_sketch_type,
plan.agent_config.sketch_type
);
}

#[test]
fn gateway_passthrough() {
let plan = RulesPlanner::new().plan(&workload(vec![AggType::Quantile]));
Expand Down
4 changes: 0 additions & 4 deletions control_plane/src/replan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: SketchType::DDSketch,
group_by: vec![],
},
precompute: vec![],
valid_until: Utc::now() + chrono::Duration::seconds(3600),
delta_decision: DeltaDecision::default(),
Expand Down
4 changes: 0 additions & 4 deletions control_plane/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ mod tests {
data_sink: AgentDataSink::default(),
},
gateway_config: GatewayCollectorConfig { passthrough: true },
backend_config: BackendCollectorConfig {
merge_sketch_type: SketchType::DDSketch,
group_by: vec![],
},
precompute: vec![],
valid_until,
delta_decision: DeltaDecision::default(),
Expand Down
7 changes: 0 additions & 7 deletions control_plane/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,6 @@ pub struct GatewayCollectorConfig {
pub passthrough: bool,
}

#[derive(Debug, Clone)]
pub struct BackendCollectorConfig {
pub merge_sketch_type: SketchType,
pub group_by: Vec<String>,
}

#[derive(Debug, Clone)]
pub struct PrecomputeJob {
pub query_expr: String,
Expand Down Expand Up @@ -570,7 +564,6 @@ impl StageResourceBudgets {
pub struct CollectionPlan {
pub agent_config: AgentCollectorConfig,
pub gateway_config: GatewayCollectorConfig,
pub backend_config: BackendCollectorConfig,
pub precompute: Vec<PrecomputeJob>,
pub valid_until: DateTime<Utc>,
/// Resolved delta transmission decision and rationale.
Expand Down