GeorryHuang commented on code in PR #5538: URL: https://github.com/apache/hbase/pull/5538#discussion_r1405415908
########## hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java: ########## @@ -1441,42 +1466,73 @@ private void releaseLock(Procedure<TEnvironment> proc, boolean force) { } } - /** - * Execute the rollback of the full procedure stack. Once the procedure is rolledback, the - * root-procedure will be visible as finished to user, and the result will be the fatal exception. - */ - private LockState executeRollback(long rootProcId, RootProcedureState<TEnvironment> procStack) { - Procedure<TEnvironment> rootProc = procedures.get(rootProcId); - RemoteProcedureException exception = rootProc.getException(); - // TODO: This needs doc. The root proc doesn't have an exception. Maybe we are - // rolling back because the subprocedure does. Clarify. - if (exception == null) { - exception = procStack.getException(); - rootProc.setFailure(exception); - store.update(rootProc); + private IdLock.Entry getLockEntryForRollback(long procId) { Review Comment: Do we need docs here? Explain the meaning of null. ########## hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureExecutor.java: ########## @@ -1577,15 +1677,6 @@ private LockState executeRollback(Procedure<TEnvironment> proc) { LOG.error(HBaseMarkers.FATAL, "CODE-BUG: Uncaught runtime exception for " + proc, e); } - // allows to kill the executor before something is stored to the wal. - // useful to test the procedure recovery. - if (testing != null && testing.shouldKillBeforeStoreUpdate()) { Review Comment: We have replaced `shouldKillBeforeStoreUpdate` here with `shouldKillBeforeStoreUpdateInRollback`? -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org