Xuebin Su has posted comments on this change. ( http://gerrit.cloudera.org:8080/21587 )
Change subject: IMPALA-13115: Add query id to error messages ...................................................................... Patch Set 8: (2 comments) Thanks for reviewing! http://gerrit.cloudera.org:8080/#/c/21587/5/be/src/service/impala-server.cc File be/src/service/impala-server.cc: http://gerrit.cloudera.org:8080/#/c/21587/5/be/src/service/impala-server.cc@a1258 PS5, Line 1258: > I'm pretty sure it is needed for Execute in case we produce a minidump. Thanks! I generated a minidump with the following change in `ExecuteStatementCommon()`: ```diff diff --git a/be/src/service/impala-hs2-server.cc b/be/src/service/impala-hs2-server.cc index 67784f588..ce8c7e436 100644 --- a/be/src/service/impala-hs2-server.cc +++ b/be/src/service/impala-hs2-server.cc @@ -611,8 +611,9 @@ void ImpalaServer::ExecuteStatementCommon(TExecuteStatementResp& return_val, QueryHandle query_handle; status = Execute(&query_ctx, session, &query_handle, external_exec_request); - // Make query id available to the following HS2_RETURN_IF_ERROR(). - ScopedThreadContext scoped_tdi(GetThreadDebugInfo(), query_handle->query_id()); + // // Make query id available to the following HS2_RETURN_IF_ERROR(). + // ScopedThreadContext scoped_tdi(GetThreadDebugInfo(), query_handle->query_id()); + VLOG_QUERY << (*(char*) nullptr); HS2_RETURN_IF_ERROR(return_val, status, SQLSTATE_GENERAL_ERROR); ``` and found that in the minidump, the query id in the thread debug info is set even without any ScopedThreadContext defined. I think this is probably because the setting is done in `PrepareQueryContext()` at the very beginning of `Execute()`. BTW, I also found that in a minidump, the thread debug info is available as a local variable in the stack frame of `Thread::SuperviseThread()`. http://gerrit.cloudera.org:8080/#/c/21587/7/shell/impala_shell.py File shell/impala_shell.py: http://gerrit.cloudera.org:8080/#/c/21587/7/shell/impala_shell.py@810 PS7, Line 810: error_pattern = re.compile("Query id [a-f0-9]+:[a-f0-9]+ not found.") > nit: we 'import re' at the top of the file, so I think this could be safely Thanks! Removed. -- To view, visit http://gerrit.cloudera.org:8080/21587 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I67e659681e36162cad1d9684189106f8eedbf092 Gerrit-Change-Number: 21587 Gerrit-PatchSet: 8 Gerrit-Owner: Xuebin Su <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Xuebin Su <[email protected]> Gerrit-Comment-Date: Wed, 31 Jul 2024 07:41:36 +0000 Gerrit-HasComments: Yes
