-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-27153 Improvements to read-path tracing #4572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we didn't have to pass the scan attribute builder through as an extra parameter to methods that don't care about tracing per se, they simply exist on the traced path. Is it possible to use threadlocals or some otel notion of thread context for these? Or is that an anti-pattern?
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
The reason that I have to pass this attributes object around is that I'm providing context that is eventually annotated to a span "event" -- essentially a log line. Otel API lets me stuff arbitrary attributes into a thread local for span attributes, not for span event attributes.
I am also not a fan of the current approach. Introducing a |
74de7bb to
3e73a7e
Compare
|
@apurtell I changed the implementation to use the otel |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
Show resolved
Hide resolved
|
Approved. I like the style way of building attributes along a method call chain without adding the builder as a method parameter. |
3e73a7e to
25aa61a
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
TestAsyncTableScan.testReverseScanNoStopKey[1: scan=batch] failure seems relevant. |
25aa61a to
38ed920
Compare
This failure is baffling to me. The assertion failed because a span with the name |
Signed-off-by: Andrew Purtell <apurtell@apache.org>
38ed920 to
0bf363e
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |


Take another pass through tracing of the read path, make adjustments accordingly. One of the major concerns raised previously is that we create a span for every block access. Start by simplifying this to trace events and see what else comes up.
Block-level and stream-level interactions are represented as span events with attached attributes (that's otel terminology for "structured logs", attached to the spans). I made an effort to surface information that an operator might be interested in while diagnosing slow read performance, and details that the previous generation of dev had already seen fit to surface via trace-level logging. We no longer emit spans for
HFileReaderImpl.readBlock. I hope this is a good compromise between visibility and performance.Also added a span context for block-cache pre-fetching.