bharathv commented on a change in pull request #1388: HBASE-24079 [Flakey 
Tests] Misc fixes and debug; fix BindException in…
URL: https://github.com/apache/hbase/pull/1388#discussion_r400451674
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
 ##########
 @@ -192,12 +188,19 @@ public String dumpQueue() {
 
   public synchronized boolean requestSplit(final Region r) {
     // don't split regions that are blocking
-    if (shouldSplitRegion() && ((HRegion)r).getCompactPriority() >= 
PRIORITY_USER) {
-      byte[] midKey = ((HRegion)r).checkSplit();
-      if (midKey != null) {
-        requestSplit(r, midKey);
-        return true;
+    HRegion hr = (HRegion)r;
+    try {
+      if (shouldSplitRegion() && hr.getCompactPriority() >= PRIORITY_USER) {
+        byte[] midKey = hr.checkSplit();
+        if (midKey != null) {
+          requestSplit(r, midKey);
+          return true;
+        }
       }
+    } catch (IndexOutOfBoundsException e) {
+      // We get this sometimes. Not sure why. Catch and return false; no split 
request.
 
 Review comment:
   nit: Add a jira reference?

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

Reply via email to