ndimiduk commented on a change in pull request #855: HBASE-23322 [hbck2]
Simplification on HBCKSCP scheduling
URL: https://github.com/apache/hbase/pull/855#discussion_r349824911
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
##########
@@ -1484,15 +1485,21 @@ public int getNumRegionsOpened() {
return 0;
}
- public long submitServerCrash(ServerName serverName, boolean shouldSplitWal)
{
- boolean carryingMeta;
- long pid;
+ /**
+ * Usually run by the Master in reaction to server crash during normal
processing.
+ * Can also be invoked via external RPC to effect repair; in the latter case,
+ * the 'force' flag is set so we push through the SCP though context may
indicate
+ * already-running-SCP (An old SCP may have exited abnormally, or damaged
cluster
+ * may still have references in hbase:meta to 'Unknown Servers' -- servers
that
+ * are not online or in dead servers list, etc.)
+ * @param force Set if the request came in externally over RPC (via hbck2).
Force means
+ * run the SCP even if it seems as though there might be an
outstanding
+ * SCP running.
+ * @return pid of scheduled SCP or {@link Procedure#NO_PROC_ID} if none
scheduled.
+ */
+ public long submitServerCrash(ServerName serverName, boolean shouldSplitWal,
boolean force) {
Review comment:
I don't love this `force` flag. I get that all we have to look for are
side-effects, but seems like there should be a way of accounting the actively
running procedures and at least wait for the current one to finish before
starting the next. Or maybe the procedure implementations can negotiate the
mutual exclusion lock between themselves? This could would unconditionally
schedule the action and the action itself would refuse to run as long as
another one is in flight. And then, of course, the second action might wake up
and find that it has no work to do.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services