This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new 126ad49607 [fix](coredump info) print query id and git commit id if be
coredump at query prepare phase (#22018)
126ad49607 is described below
commit 126ad496077cb02f3e8f6a50bc8fc2f0c682f515
Author: TengJianPing <[email protected]>
AuthorDate: Thu Jul 20 11:06:52 2023 +0800
[fix](coredump info) print query id and git commit id if be coredump at
query prepare phase (#22018)
---
be/src/common/signal_handler.h | 8 ++++++++
be/src/runtime/fragment_mgr.cpp | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/be/src/common/signal_handler.h b/be/src/common/signal_handler.h
index 7f38f385a7..c8eff69abf 100644
--- a/be/src/common/signal_handler.h
+++ b/be/src/common/signal_handler.h
@@ -45,6 +45,7 @@
# include <sys/ucontext.h>
#endif
#include <algorithm>
+#include "gen_cpp/version.h"
namespace doris::signal {
@@ -251,6 +252,10 @@ void WriteToStderr(const char* data, size_t size) {
// The writer function can be changed by InstallFailureWriter().
void (*g_failure_writer)(const char* data, size_t size) = WriteToStderr;
+const char* doris_build_short_hash() {
+ return DORIS_BUILD_SHORT_HASH;
+}
+
// Dumps time information. We don't dump human-readable time information
// as localtime() is not guaranteed to be async signal safe.
void DumpTimeInfo() {
@@ -268,6 +273,9 @@ void DumpTimeInfo() {
formatter.AppendString(" try \"date -d @");
formatter.AppendUint64(static_cast<uint64>(time_in_sec), 10);
formatter.AppendString("\" if you are using GNU date ***\n");
+ formatter.AppendString("*** Current BE git commitID: ");
+ formatter.AppendString(doris_build_short_hash());
+ formatter.AppendString(" ***\n");
g_failure_writer(buf, formatter.num_bytes_written());
}
diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 5e9b525e04..6c543c5993 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -579,6 +579,10 @@ std::shared_ptr<StreamLoadPipe>
FragmentMgr::get_pipe(const TUniqueId& fragment_
}
Status FragmentMgr::exec_plan_fragment(const TExecPlanFragmentParams& params,
FinishCallback cb) {
+ // these two are used to output query_id when be cored dump.
+ doris::signal::query_id_hi = params.params.query_id.hi;
+ doris::signal::query_id_lo = params.params.query_id.lo;
+
const TUniqueId& fragment_instance_id = params.params.fragment_instance_id;
{
std::lock_guard<std::mutex> lock(_lock);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]