ndimiduk commented on code in PR #4381:
URL: https://github.com/apache/hbase/pull/4381#discussion_r862701825


##########
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:
   This implementation is very naive. There is no relationship between parent 
and child procedure. There is no concept of tying together multiple 
suspend/resume executions of the same procedure ID. It's merely a way to 
recognize that all the resulting RPCs are tied back to a procedure by ID. We 
can explore those additional features, and I agree that effort should include a 
lot more thought.



-- 
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]

Reply via email to