@@ -87,7 +87,6 @@ QueryContext::QueryContext(TUniqueId query_id, ExecEnv* exec_env,
87
87
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER (query_mem_tracker);
88
88
_query_watcher.start ();
89
89
_shared_hash_table_controller.reset (new vectorized::SharedHashTableController ());
90
- _shared_scanner_controller.reset (new vectorized::SharedScannerController ());
91
90
_execution_dependency = pipeline::Dependency::create_unique (-1 , -1 , " ExecutionDependency" );
92
91
_runtime_filter_mgr = std::make_unique<RuntimeFilterMgr>(
93
92
TUniqueId (), RuntimeFilterParamsContext::create (this ), query_mem_tracker);
@@ -193,7 +192,6 @@ QueryContext::~QueryContext() {
193
192
_runtime_filter_mgr.reset ();
194
193
_execution_dependency.reset ();
195
194
_shared_hash_table_controller.reset ();
196
- _shared_scanner_controller.reset ();
197
195
_runtime_predicates.clear ();
198
196
file_scan_range_params_map.clear ();
199
197
obj_pool.clear ();
@@ -206,24 +204,14 @@ QueryContext::~QueryContext() {
206
204
207
205
void QueryContext::set_ready_to_execute (Status reason) {
208
206
set_execution_dependency_ready ();
209
- {
210
- std::lock_guard<std::mutex> l (_start_lock);
211
- _exec_status.update (reason);
212
- _ready_to_execute = true ;
213
- }
207
+ _exec_status.update (reason);
214
208
if (query_mem_tracker && !reason.ok ()) {
215
209
query_mem_tracker->set_is_query_cancelled (!reason.ok ());
216
210
}
217
- _start_cond.notify_all ();
218
211
}
219
212
220
213
void QueryContext::set_ready_to_execute_only () {
221
214
set_execution_dependency_ready ();
222
- {
223
- std::lock_guard<std::mutex> l (_start_lock);
224
- _ready_to_execute = true ;
225
- }
226
- _start_cond.notify_all ();
227
215
}
228
216
229
217
void QueryContext::set_execution_dependency_ready () {
@@ -284,21 +272,6 @@ std::string QueryContext::print_all_pipeline_context() {
284
272
return fmt::to_string (debug_string_buffer);
285
273
}
286
274
287
- Status QueryContext::cancel_pipeline_context (const int fragment_id, const Status& reason) {
288
- std::weak_ptr<pipeline::PipelineFragmentContext> ctx_to_cancel;
289
- {
290
- std::lock_guard<std::mutex> lock (_pipeline_map_write_lock);
291
- if (!_fragment_id_to_pipeline_ctx.contains (fragment_id)) {
292
- return Status::InternalError (" fragment_id_to_pipeline_ctx is empty!" );
293
- }
294
- ctx_to_cancel = _fragment_id_to_pipeline_ctx[fragment_id];
295
- }
296
- if (auto pipeline_ctx = ctx_to_cancel.lock ()) {
297
- pipeline_ctx->cancel (reason);
298
- }
299
- return Status::OK ();
300
- }
301
-
302
275
void QueryContext::set_pipeline_context (
303
276
const int fragment_id, std::shared_ptr<pipeline::PipelineFragmentContext> pip_ctx) {
304
277
std::lock_guard<std::mutex> lock (_pipeline_map_write_lock);
0 commit comments