You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:01:11 UTC

[GitHub] [hbase] d-c-manning commented on a change in pull request #3402: HBASE-25130 - Fix master in-memory server holding map after:

d-c-manning commented on a change in pull request #3402:
URL: https://github.com/apache/hbase/pull/3402#discussion_r654022634



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
##########
@@ -1661,6 +1661,17 @@ public void regionOffline(final HRegionInfo regionInfo) {
     regionOffline(regionInfo, null);
   }
 
+  /**
+   * Marks the region as offline. In addition whether removing it from
+   * replicas and master in-memory server holding map.
+   * <p>
+   * @param regionInfo
+   * @param force

Review comment:
       let's add some descriptive text about why `force` would be used. Specifically that no known use case should have to use it except hbck, which desires to force a region offline and not have it ever be reopened on another server.

##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
##########
@@ -882,6 +882,80 @@ public void testDupeStartKey() throws Exception {
       assertNoErrors(hbck2);
       assertEquals(0, hbck2.getOverlapGroups(table).size());
       assertEquals(ROWKEYS.length, countRows());
+
+      MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
+      long totalRegions = cluster.countServedRegions();
+
+      // stop a region servers and run fsck again
+      cluster.stopRegionServer(server);
+      cluster.waitForRegionServerToStop(server, 60);
+
+      // wait for all regions to come online.
+      while (cluster.countServedRegions() < totalRegions) {
+        try {
+          Thread.sleep(100);
+        } catch (InterruptedException e) {}

Review comment:
       does this `InterruptedException` need to be caught? Can't the test method throw it?




-- 
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:
users@infra.apache.org