You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "gourabtaparia (via GitHub)" <gi...@apache.org> on 2023/09/28 06:44:19 UTC

[GitHub] [hbase] gourabtaparia commented on a diff in pull request #2924: HBASE-25549 Provide a switch that allows avoiding reopening all regions when modifying a table to prevent RIT storms.

gourabtaparia commented on code in PR #2924:
URL: https://github.com/apache/hbase/pull/2924#discussion_r1339608579


##########
hbase-shell/src/main/ruby/shell/commands/alter.rb:
##########
@@ -72,6 +72,13 @@ def help
   hbase> alter 't1', CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}
   hbase> alter 't1', {NAME => 'f2', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
 
+You can also set configuration setting with 'no_reopen_regions' to avoid regions RIT, which let the
+modification take effect after regions was reopened (Be careful, the regions of the table may be
+configured inconsistently If regions are not reopened after the modification)
+
+  hbase> alter 't1', METHOD => 'no_reopen_regions', CONFIGURATION => {'hbase.hregion.scan

Review Comment:
   Minor : no_reopen_regions sounds a bit differently worded. Can we use something like 'avoid_reopening_regions' or 'dont_reopen_regions' ? or anything better ? I know dont without any apostrophe is still not good. 



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestModifyTableProcedure.java:
##########
@@ -584,4 +589,100 @@ public void run() {
     t2.join();
     assertFalse("Expected ConcurrentTableModificationException.", (t1.exception || t2.exception));
   }
+
+  @Test
+  public void testModifyWillNotReopenRegions() throws IOException {
+    final boolean reopenRegions = false;
+    final TableName tableName = TableName.valueOf(name.getMethodName());
+    final ProcedureExecutor<MasterProcedureEnv> procExec = getMasterProcedureExecutor();
+
+    MasterProcedureTestingUtility.createTable(procExec, tableName, null, "cf");
+    UTIL.getAdmin().disableTable(tableName);

Review Comment:
   Can we do this without disabling the Table in UT ? As in the actual command line flow when using with alter command, one need not disable the table.  



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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org