[
https://issues.apache.org/jira/browse/IMPALA-14370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079791#comment-18079791
]
ASF subversion and git services commented on IMPALA-14370:
----------------------------------------------------------
Commit c2b6d40f3447168020cc57749b0ba5630c9aa1f9 in impala's branch
refs/heads/master from jfehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=c2b6d40f3 ]
IMPALA-14370: [Patch 1 of 2] - OpenTelemetry Query Tracing Skips Queries with
Leading Comments
Since OpenTelemetry traces must be opened before query planning
starts, a rudimentary text parser was implemented to determine, based
on the first query keyword, if the query should be traced. This
parser could be fooled by a multiline comment such as:
/*/ comment */ select * from db.tbl
This type of leading comment would cause query tracing to be skipped.
Removes this parser and switches to using the frontend's query
parsing result to determine if a query should be traced. The backend
now queues a copy of all necessary data until the frontend parses the
query. At that point, a JNI call is made to the backend letting it
know whether or not to trace the query. The backend either frees the
queued data or starts the OpenTelemetry trace sending it to the trace
management system.
A new backend class named "BufferedSpan" is added. This class
replaces the existing "TimedSpan" class. This new class has the
ability to queue all necessary data for the root, Init, Submitted,
and Planning spans until it is notified to start an OpenTelemetry
trace using the OpenTelemetry-cpp SDK. At that point, it creates
and sends to the OpenTelemetry trace management system a new root
span with completed Init and Submitted child spans. A planning child
span is also started via the SDK but not ended. The other child spans
AdmissionControl, QueryExecution, and Close are started and ended in
real time as those phases of the query lifecycle start/end.
Testing accomplished with existing tests passing along with new ctest
and custom cluster tests added. The full EE test suite passed with
tracing enabled as part of the cluster start args.
Generated-by: Github Copilot (GPT-5.3-Codex)
Change-Id: I1425b32006f81586bf75c2e4045d23bab91e1611
Reviewed-on: http://gerrit.cloudera.org:8080/23777
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> OTel Tracing Skips Queries with Leading Comments
> ------------------------------------------------
>
> Key: IMPALA-14370
> URL: https://issues.apache.org/jira/browse/IMPALA-14370
> Project: IMPALA
> Issue Type: Bug
> Reporter: Jason Fehr
> Assignee: Jason Fehr
> Priority: Critical
>
> The code in otel.cc that determines whether or not a query should be traced
> does not handle comments if written similar to:
> /*/ comment */select * from tbl
> The code is detecting the first */ as the end of the comment. Impala itself
> does correctly parse this query, so it is not a syntax error.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]