Skip to content

Commit 55a1ac0

Browse files
authored
fix(executor): fix broken profile graph for cluster mode (#14666)
1 parent 27bf797 commit 55a1ac0

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/query/pipeline/core/src/pipeline.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ impl Pipeline {
103103
}
104104
}
105105

106-
pub fn reset_scopes(&mut self, scopes: Vec<PlanScope>) {
107-
self.scope_size = Arc::new(AtomicUsize::new(scopes.len()));
108-
self.plans_scope = scopes;
106+
pub fn reset_scopes(&mut self, other: &Self) {
107+
self.scope_size = other.scope_size.clone();
108+
self.plans_scope = other.plans_scope.clone();
109109
}
110110

111111
pub fn is_empty(&self) -> bool {

src/query/service/src/pipelines/builders/builder_exchange.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ impl PipelineBuilder {
2828
)?;
2929

3030
// add profile
31-
let scopes = self.main_pipeline.get_scopes();
32-
build_res
33-
.main_pipeline
34-
.reset_scopes(scopes[..scopes.len() - 1].to_vec());
31+
build_res.main_pipeline.reset_scopes(&self.main_pipeline);
3532
// add sharing data
3633
self.join_state = build_res.builder_data.input_join_state;
3734
self.merge_into_probe_data_fields = build_res.builder_data.input_probe_schema;

0 commit comments

Comments
 (0)