Umeshkumar9414 commented on code in PR #5816:
URL: https://github.com/apache/hbase/pull/5816#discussion_r1620761057
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerRemoteProcedure.java:
##########
@@ -80,17 +82,25 @@ public abstract class ServerRemoteProcedure extends
Procedure<MasterProcedureEnv
protected ServerName targetServer;
protected boolean dispatched;
protected boolean succ;
+ // after remoteProcedureDone we require error field to decide the next state
+ protected Throwable remoteError;
+ protected MasterProcedureProtos.ServerRemoteProcedureState state =
+
MasterProcedureProtos.ServerRemoteProcedureState.SERVER_REMOTE_PROCEDURE_DISPATCH;
protected abstract void complete(MasterProcedureEnv env, Throwable error);
@Override
protected synchronized Procedure<MasterProcedureEnv>[]
execute(MasterProcedureEnv env)
throws ProcedureYieldException, ProcedureSuspendedException,
InterruptedException {
- if (dispatched) {
+ if (
+ state !=
MasterProcedureProtos.ServerRemoteProcedureState.SERVER_REMOTE_PROCEDURE_DISPATCH
+ ) {
+ complete(env, this.remoteError);
if (succ) {
Review Comment:
It is done and now I think there is no need for succ flag. same as
dispatched flag also that is also replaced by state.
--
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]