Skip to content

Commit af1de44

Browse files
committed
HBASE-25835 Ignore duplicate split requests from regionserver reports
A SplitTableRegionProcedure may already be running when a regionserver report is received that includes a split request. The outcome is multiple SplitTableRegionProcedure procedures scheduled for the split request, only one of which can succeed. The others error out. Do not create a split procedure in response to a region state change report if the region is not open or already splitting.
1 parent 00fec24 commit af1de44

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,13 @@ private void updateRegionSplitTransition(final ServerName serverName, final Tran
11261126
LOG.debug("Split request from " + serverName +
11271127
", parent=" + parent + " splitKey=" + Bytes.toStringBinary(splitKey));
11281128
}
1129-
master.getMasterProcedureExecutor().submitProcedure(createSplitProcedure(parent, splitKey));
1129+
if (regionStates.getRegionState(parent).isOpened() &&
1130+
!regionStates.getRegionState(parent).isSplitting()) {
1131+
master.getMasterProcedureExecutor().submitProcedure(createSplitProcedure(parent, splitKey));
1132+
} else {
1133+
LOG.info("Ignoring split request from " + serverName +
1134+
", parent=" + parent + " because parent is already splitting or not online");
1135+
}
11301136

11311137
// If the RS is < 2.0 throw an exception to abort the operation, we are handling the split
11321138
if (master.getServerManager().getVersionNumber(serverName) < 0x0200000) {

0 commit comments

Comments
 (0)