[enhancement](signal) output query_id when 'be' core dumped #15080
This commit is contained in:
@ -27,7 +27,6 @@
|
||||
|
||||
#include "agent/cgroups_mgr.h"
|
||||
#include "common/object_pool.h"
|
||||
#include "common/signal_handler.h"
|
||||
#include "gen_cpp/FrontendService.h"
|
||||
#include "gen_cpp/PaloInternalService_types.h"
|
||||
#include "gen_cpp/PlanNodes_types.h"
|
||||
@ -483,10 +482,6 @@ void FragmentMgr::_exec_actual(std::shared_ptr<FragmentExecState> exec_state, Fi
|
||||
span->SetAttribute("query_id", print_id(exec_state->query_id()));
|
||||
span->SetAttribute("instance_id", print_id(exec_state->fragment_instance_id()));
|
||||
|
||||
// these two are used to output query_id when be cored dump.
|
||||
doris::signal::query_id_hi = exec_state->query_id().hi;
|
||||
doris::signal::query_id_lo = exec_state->query_id().lo;
|
||||
|
||||
LOG_INFO(func_name)
|
||||
.tag("query_id", exec_state->query_id())
|
||||
.tag("instance_id", exec_state->fragment_instance_id())
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
#include "runtime/thread_context.h"
|
||||
|
||||
#include "common/signal_handler.h"
|
||||
#include "runtime/runtime_state.h"
|
||||
#include "util/doris_metrics.h"
|
||||
|
||||
@ -44,6 +45,8 @@ AttachTask::AttachTask(const std::shared_ptr<MemTrackerLimiter>& mem_tracker,
|
||||
}
|
||||
|
||||
AttachTask::AttachTask(RuntimeState* runtime_state) {
|
||||
doris::signal::query_id_hi = runtime_state->query_id().hi;
|
||||
doris::signal::query_id_lo = runtime_state->query_id().lo;
|
||||
thread_context()->attach_task(print_id(runtime_state->query_id()),
|
||||
runtime_state->fragment_instance_id(),
|
||||
runtime_state->query_mem_tracker());
|
||||
|
||||
Reference in New Issue
Block a user