Apache9 commented on code in PR #5799:
URL: https://github.com/apache/hbase/pull/5799#discussion_r1554949639
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/MergeTableRegionsProcedure.java:
##########
@@ -639,8 +639,27 @@ private void cleanupMergedRegion(final MasterProcedureEnv
env) throws IOExceptio
* Rollback close regions
**/
private void rollbackCloseRegionsForMerge(MasterProcedureEnv env) throws
IOException {
- AssignmentManagerUtil.reopenRegionsForRollback(env,
Arrays.asList(regionsToMerge),
- getRegionReplication(env), getServerName(env));
+ // At this point we should check if region was actually closed. If it was
not closed then we
+ // don't need to repoen the region and we can just change the regionNode
state to OPEN.
+ // if it is alredy closed then we need to do a reopen of region
+ ServerName serverName = getServerName(env);
Review Comment:
I think we only need to check the region state here.
If it is in CLOSED state, we schedule a TRSP to bring it online. Otherwise,
it can only be in MERGING state, then we just set it to OPEN, without
scheduling a TRSP.
And even if we want to check whether the region is online on a region
server, the code here is incorrect...
The serverName is where we want to make the merged region online, not the
region servers which host the regioins we want to merge... Obviously, at least
we want to merge two regions, and the two regions are allowed to be hosted on
different region servers right?
--
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]