This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 432d141 HBASE-25835 Ignore duplicate split requests from regionserver
reports (#3218)
432d141 is described below
commit 432d14147495cbac82f68310a55b2007cde44891
Author: Andrew Purtell <[email protected]>
AuthorDate: Tue May 4 10:05:29 2021 -0700
HBASE-25835 Ignore duplicate split requests from regionserver reports
(#3218)
Processing of the RS report happens asynchronously from other activities
which can mutate region state. For example, a split procedure may already
be running. A split procedure cannot succeed if the parent region is no
longer open, so we can ignore it in that case.
Note that submitting more than one split procedure for a given region is
harmless -- the split is fenced in the procedure handling -- but it would
be noisy in the logs. Only one procedure can succeed. The other
procedure(s) would abort during initialization and report failure with
WARN level logging.
Signed-off-by: Bharath Vissapragada <[email protected]>
Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Pankaj <[email protected]>
---
.../hbase/master/assignment/AssignmentManager.java | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
index 8861674..702d04b 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
@@ -1126,7 +1126,23 @@ public class AssignmentManager {
LOG.debug("Split request from " + serverName +
", parent=" + parent + " splitKey=" +
Bytes.toStringBinary(splitKey));
}
-
master.getMasterProcedureExecutor().submitProcedure(createSplitProcedure(parent,
splitKey));
+ // Processing this report happens asynchronously from other activities
which can mutate
+ // the region state. For example, a split procedure may already be running
for this parent.
+ // A split procedure cannot succeed if the parent region is no longer
open, so we can
+ // ignore it in that case.
+ // Note that submitting more than one split procedure for a given region is
+ // harmless -- the split is fenced in the procedure handling -- but it
would be noisy in
+ // the logs. Only one procedure can succeed. The other procedure(s) would
abort during
+ // initialization and report failure with WARN level logging.
+ RegionState parentState = regionStates.getRegionState(parent);
+ if (parentState != null && parentState.isOpened()) {
+
master.getMasterProcedureExecutor().submitProcedure(createSplitProcedure(parent,
+ splitKey));
+ } else {
+ LOG.info("Ignoring split request from " + serverName +
+ ", parent=" + parent + " because parent is unknown or not open");
+ return;
+ }
// If the RS is < 2.0 throw an exception to abort the operation, we are
handling the split
if (master.getServerManager().getVersionNumber(serverName) < 0x0200000) {