virajjasani commented on PR #5799:
URL: https://github.com/apache/hbase/pull/5799#issuecomment-2041555045

   > I think i made a mistake. A small but important one which breaks/"doesn't 
follow" the design of rollback in procedure framework. We didnot change 
regionNode state in `MERGE_TABLE_REGIONS_CLOSE_REGIONS` so ideally we should 
not set back the state in rollback of the above state. Instead it is better to 
change the regionNode state in rollback of state `MERGE_TABLE_REGIONS_PREPARE` 
which is currently noop.
   
   I think the current logic of the PR is also fine, because since the last 
step is no-op, `MERGE_TABLE_REGIONS_CLOSE_REGIONS` step is taking care of both. 
It doesn't seem functional problem, it's just that by doing so we will follow 
proper semantics of rollback. Otherwise either way, the result should be 
similar.
   
   Okay, so let's keep this logic in `MERGE_TABLE_REGIONS_PREPARE` by creating 
a new method since it is no-op as of today:
   ```
         if (regionStateNode.getState() == State.MERGING) {
           regionStateNode.setState(State.OPEN);
         }
   ```
   
   


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