Apache9 commented on code in PR #6905:
URL: https://github.com/apache/hbase/pull/6905#discussion_r2043327270


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionRemoteProcedureBase.java:
##########
@@ -296,12 +296,25 @@ private void setFuture(CompletableFuture<Void> f) {
   }
 
   @Override
-  protected Procedure<MasterProcedureEnv>[] execute(MasterProcedureEnv env)
-    throws ProcedureYieldException, ProcedureSuspendedException, 
InterruptedException {
+  protected void beforeExec(MasterProcedureEnv env) throws 
ProcedureSuspendedException {
     RegionStateNode regionNode = getRegionNode(env);
     if (!regionNode.isLockedBy(this)) {
       regionNode.lock(this, () -> ProcedureFutureUtil.wakeUp(this, env));
     }
+  }
+
+  @Override
+  protected void afterExec(MasterProcedureEnv env) {
+    if (future == null) {

Review Comment:
   This is an improvement on 3.x, where we will throw 
ProcedureSuspendedException when updating meta, to avoid consuming a PEWorker 
while doing external I/O. If the future is not null, it means we have a out 
going meta updating operation which is not finished yet, so we should not 
release the region node lock, to keep the old locking way.
   
   Please see HBASE-28196.



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