Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1289,11 +1289,15 @@ public HFileBlock readBlock(long dataBlockOffset, long onDiskBlockSize, final bo

BlockCacheKey cacheKey =
new BlockCacheKey(path, dataBlockOffset, this.isPrimaryReplicaReader(), expectedBlockType);
Attributes attributes = Attributes.of(BLOCK_CACHE_KEY_KEY, cacheKey.toString());

boolean useLock = false;
IdLock.Entry lockEntry = null;
final Span span = Span.current();
// BlockCacheKey#toString() is quite expensive to call, so if tracing isn't enabled, don't
// record
Attributes attributes = span.isRecording()
? Attributes.of(BLOCK_CACHE_KEY_KEY, cacheKey.toString())
: Attributes.empty();
try {
while (true) {
// Check cache for block. If found return.
Expand Down