chaijunjie0101 commented on code in PR #5502:
URL: https://github.com/apache/hbase/pull/5502#discussion_r1386874393


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java:
##########
@@ -133,7 +137,13 @@ protected Flow executeFromState(final MasterProcedureEnv 
env, DeleteTableState s
       if (isRollbackSupported(state)) {
         setFailure("master-delete-table", e);
       } else {
-        LOG.warn("Retriable error trying to delete table=" + getTableName() + 
" state=" + state, e);
+        if (retryCounter == null) {
+          retryCounter = 
ProcedureUtil.createRetryCounter(env.getMasterConfiguration());
+        }
+        long sleepTime = retryCounter.getBackoffTimeAndIncrementAttempts();
+        LOG.warn("Retriable error trying to delete table=" + getTableName() + 
" state=" + state
+          + ", Will sleep " + sleepTime / 1000 + " secs and try again later", 
e);
+        Threads.sleep(sleepTime);

Review Comment:
   thanks for reviwing
   1. i have some questions...
   you suggest call suspend method from the parent Procedure? 
   but CreateTableProcedure did not have a parent proc, or you mean we need add 
a suspent method to
   AbstractStateMachineTableProcedure?
   For the old logic, althouth TRSP could suspent, but CreateTableProcedure 
could not..
   
   2.yeah, we need reset the retryCounter...
   
   
   
   



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

Reply via email to