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 2020/05/22 08:44:19 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #1753: HBASE-24408 Introduce a general 'local region' to store data on master

Apache9 commented on a change in pull request #1753:
URL: https://github.com/apache/hbase/pull/1753#discussion_r429120400



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java
##########
@@ -183,51 +106,14 @@ public void start(int numThreads) throws IOException {
     this.numThreads = numThreads;
   }
 
-  private void shutdownWAL() {
-    if (walFactory != null) {
-      try {
-        walFactory.shutdown();
-      } catch (IOException e) {
-        LOG.warn("Failed to shutdown WAL", e);
-      }
-    }
-  }
-
-  private void closeRegion(boolean abort) {
-    if (region != null) {
-      try {
-        region.close(abort);
-      } catch (IOException e) {
-        LOG.warn("Failed to close region", e);
-      }
-    }
-
-  }
-
   @Override
   public void stop(boolean abort) {
     if (!setRunning(false)) {
       return;
     }
     LOG.info("Stopping the Region Procedure Store, isAbort={}", abort);
-    if (cleaner != null) {
-      cleaner.cancel(abort);
-    }
-    if (flusherAndCompactor != null) {
-      flusherAndCompactor.close();
-    }
-    // if abort, we shutdown wal first to fail the ongoing updates to the region, and then close the
-    // region, otherwise there will be dead lock.
-    if (abort) {
-      shutdownWAL();
-      closeRegion(true);
-    } else {
-      closeRegion(false);
-      shutdownWAL();
-    }
-
-    if (walRoller != null) {
-      walRoller.close();
+    if (localStore != null) {

Review comment:
       Oh, maybe we do not need to restart the local region when testing procedure store restart. Just add some tests to make sure that the local store recovery can work is enough?
   Let me have a try.




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