Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Apr 16, 2024
1 parent ab68556 commit a058132
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions be/src/runtime/fragment_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,6 @@ Status FragmentMgr::exec_plan_fragment(const TPipelineFragmentParams& params,
return Status::OK();
} else {
auto pre_and_submit = [&](int i) {
SCOPED_ATTACH_TASK_WITH_ID(query_ctx->query_mem_tracker, params.query_id);
const auto& local_params = params.local_params[i];

const TUniqueId& fragment_instance_id = local_params.fragment_instance_id;
Expand Down Expand Up @@ -984,7 +983,10 @@ Status FragmentMgr::exec_plan_fragment(const TPipelineFragmentParams& params,

for (size_t i = 0; i < target_size; i++) {
RETURN_IF_ERROR(_thread_pool->submit_func([&, i]() {
prepare_status[i] = pre_and_submit(i);
{
SCOPED_ATTACH_TASK_WITH_ID(query_ctx->query_mem_tracker, params.query_id);
prepare_status[i] = pre_and_submit(i);
}
std::unique_lock<std::mutex> lock(m);
prepare_done++;
if (prepare_done == target_size) {
Expand Down

0 comments on commit a058132

Please sign in to comment.