Apache9 commented on code in PR #4381:
URL: https://github.com/apache/hbase/pull/4381#discussion_r862346496
##########
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java:
##########
@@ -1971,27 +2002,7 @@ public void run() {
continue;
}
this.activeProcedure = proc;
- int activeCount = activeExecutorCount.incrementAndGet();
- int runningCount = store.setRunningProcedureCount(activeCount);
- LOG.trace("Execute pid={} runningCount={}, activeCount={}",
proc.getProcId(),
- runningCount, activeCount);
- executionStartTime.set(EnvironmentEdgeManager.currentTime());
- IdLock.Entry lockEntry =
procExecutionLock.getLockEntry(proc.getProcId());
- try {
- executeProcedure(proc);
- } catch (AssertionError e) {
- LOG.info("ASSERT pid=" + proc.getProcId(), e);
- throw e;
- } finally {
- procExecutionLock.releaseLockEntry(lockEntry);
- activeCount = activeExecutorCount.decrementAndGet();
- runningCount = store.setRunningProcedureCount(activeCount);
- LOG.trace("Halt pid={} runningCount={}, activeCount={}",
proc.getProcId(),
- runningCount, activeCount);
- this.activeProcedure = null;
- lastUpdate = EnvironmentEdgeManager.currentTime();
- executionStartTime.set(Long.MAX_VALUE);
- }
+ lastUpdate = TraceUtil.trace(this::runProcedure, new
ProcedureSpanBuilder(proc));
Review Comment:
In a procedure's whole life time, it could reach here multiple times. For
example, if it schedules some sub procedures, it will suspend itself for a
while until all the sub procedures are finished, it will recover the execution.
So I think if we want to trace procedure execution, we need to discuss more,
and better to have a design doc first. It is not very straight forward, as how
to define the relationship between parent procedure and sub procedure?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]