Apache9 commented on a change in pull request #2861:
URL: https://github.com/apache/hbase/pull/2861#discussion_r556333417
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -6637,23 +6655,27 @@ protected RowLock getRowLockInternal(byte[] row,
boolean readLock, final RowLock
}
rowLockContext.setThreadName(Thread.currentThread().getName());
success = true;
+ span.setStatus(StatusCode.OK);
return result;
} catch (InterruptedException ie) {
if (LOG.isDebugEnabled()) {
LOG.debug("Thread interrupted waiting for lock on row: {}, in region
{}", rowKey,
getRegionInfo().getRegionNameAsString());
}
- span.addEvent("Interrupted exception getting row lock");
+ TraceUtil.setError(span, ie);
throw throwOnInterrupt(ie);
} catch (Error error) {
// The maximum lock count for read lock is 64K (hardcoded), when this
maximum count
// is reached, it will throw out an Error. This Error needs to be caught
so it can
// go ahead to process the minibatch with lock acquired.
LOG.warn("Error to get row lock for {}, in region {}, cause: {}",
Bytes.toStringBinary(row),
getRegionInfo().getRegionNameAsString(), error);
+ TraceUtil.setError(span, error);
IOException ioe = new IOException(error);
- span.addEvent("Error getting row lock");
throw ioe;
+ } catch (Throwable t) {
Review comment:
This is for recording the span status.
Let me see if we could change to use TraceUtil.trace to increase the
readability.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]