You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/05/18 08:47:03 UTC

[GitHub] [hive] hmangla98 opened a new pull request, #3298: HIVE-26237: Check if replication cause metastore connection leakage

hmangla98 opened a new pull request, #3298:
URL: https://github.com/apache/hive/pull/3298

   Problems:
   1. Some replication tests don't close the ongoing HMS connections.
   2. At one place in ReplLoadTask, we initiate a fresh HMS connection but don't close it.
   3. In DDLOperationContext.java, sometimes stored Hive db object is closed and a new object is instantiated. In this case, Actual ddl operations (say CreateDatabaseOperation) will make fresh HMS connection in outdated Hive obj and it will never get closed since that this connection is not accessible. This is causing connection leakage.


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875772505


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
-    } catch (IOException e) {
+      Hive.getCurrHiveDb(null, null).close(true);
+    } catch (IOException | HiveException e) {
 

Review Comment:
   Noted.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875788657


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -534,6 +538,7 @@ public static void set(Hive hive) {
   }
 
   public static void closeCurrent() {
+    hiveDB.get().isCurrentClosed = true;

Review Comment:
   can we set this flag in:
   ````
   public void close(boolean forceClose) {
       .....
       isClosed = true;
   }
   ````



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pvary commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
pvary commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875768254


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/DDLOperationContext.java:
##########
@@ -51,8 +51,8 @@ public DDLOperationContext(HiveConf conf, Context context, DDLTask task, DDLWork
     this.console = console;
   }
 
-  public Hive getDb() {
-    return db;
+  public Hive getDb() throws HiveException {
+    return Hive.getCurrHiveDb(db, conf);

Review Comment:
   Is there a situation when this is `null` or `closed`?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pvary commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
pvary commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875767443


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -500,6 +500,10 @@ public static Hive getThreadLocal() {
     return hiveDB.get();
   }
 
+  public static Hive getCurrHiveDb(Hive hiveDb, HiveConf c) throws HiveException {

Review Comment:
   Do we really want to have a new method for this?
   
   What if we modify the `get`, or the `getThreadLocal` to provide an always open `Hive`? 



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r876888023


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
     } catch (IOException e) {
 
     }
+    Hive.getThreadLocal().close(true);

Review Comment:
   same as above



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875776250


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java:
##########
@@ -549,8 +547,7 @@ private void createReplLoadCompleteAckTask() {
         @Override
         public void run() throws SemanticException {
           try {
-            HiveMetaStoreClient metaStoreClient = new HiveMetaStoreClient(conf);
-            long currentNotificationID = metaStoreClient.getCurrentNotificationEventId().getEventId();
+            long currentNotificationID = getHive().getMSC().getCurrentNotificationEventId().getEventId();

Review Comment:
   hard to read, split it on few assignments as before



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875782510


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -534,6 +538,7 @@ public static void set(Hive hive) {
   }
 
   public static void closeCurrent() {
+    hiveDB.get().isCurrentClosed = true;

Review Comment:
   could we create a method `close` that sets this flag?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875780368


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -253,6 +252,7 @@ public class Hive {
   private SynchronizedMetaStoreClient syncMetaStoreClient;
   private UserGroupInformation owner;
   private boolean isAllowClose = true;
+  private boolean isCurrentClosed = false;

Review Comment:
   maybe simply `isClosed`?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875771882


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/DDLOperationContext.java:
##########
@@ -51,8 +51,8 @@ public DDLOperationContext(HiveConf conf, Context context, DDLTask task, DDLWork
     this.console = console;
   }
 
-  public Hive getDb() {
-    return db;
+  public Hive getDb() throws HiveException {
+    return Hive.getCurrHiveDb(db, conf);

Review Comment:
   Yes, there is a situation where hive connections is closed and it still returns reference of the closed hive object.



##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/DDLOperationContext.java:
##########
@@ -51,8 +51,8 @@ public DDLOperationContext(HiveConf conf, Context context, DDLTask task, DDLWork
     this.console = console;
   }
 
-  public Hive getDb() {
-    return db;
+  public Hive getDb() throws HiveException {
+    return Hive.getCurrHiveDb(db, conf);

Review Comment:
   Yes, there is a situation where hive connection is closed and it still returns reference of the closed hive object.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875995561


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
-    } catch (IOException e) {
+      Hive.getCurrHiveDb(null, null).close(true);

Review Comment:
   Done



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r876887257


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/BaseReplicationAcrossInstances.java:
##########
@@ -121,6 +122,7 @@ static void internalBeforeClassSetupExclusiveReplica(Map<String, String> primary
   public static void classLevelTearDown() throws IOException {
     primary.close();
     replica.close();
+    Hive.getThreadLocal().close(true);

Review Comment:
   Hive.closeCurrent() won't do here? If not Hive.getThreadLocal() might be null, so we should handle that.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ merged pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ merged PR #3298:
URL: https://github.com/apache/hive/pull/3298


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875774306


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
-    } catch (IOException e) {
+      Hive.getCurrHiveDb(null, null).close(true);

Review Comment:
   why not just:
   ````
   Hive db = Hive.getThreadLocal().close(true)
   ````



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875993093


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -500,6 +500,10 @@ public static Hive getThreadLocal() {
     return hiveDB.get();
   }
 
+  public static Hive getCurrHiveDb(Hive hiveDb, HiveConf c) throws HiveException {

Review Comment:
   Done



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r876899781


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/BaseReplicationAcrossInstances.java:
##########
@@ -121,6 +122,7 @@ static void internalBeforeClassSetupExclusiveReplica(Map<String, String> primary
   public static void classLevelTearDown() throws IOException {
     primary.close();
     replica.close();
+    Hive.getThreadLocal().close(true);

Review Comment:
   Agreed. 



##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
     } catch (IOException e) {
 
     }
+    Hive.getThreadLocal().close(true);

Review Comment:
   Done



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875782510


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -534,6 +538,7 @@ public static void set(Hive hive) {
   }
 
   public static void closeCurrent() {
+    hiveDB.get().isCurrentClosed = true;

Review Comment:
   could we create a method `close` that sets this flag?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875754574


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java:
##########
@@ -262,17 +263,20 @@ public static void tearDownAfterClass(){
     // FIXME : should clean up TEST_PATH, but not doing it now, for debugging's sake
     //Clean up the warehouse after test run as we are restoring the warehouse path for other metastore creation
     Path warehousePath = new Path(MetastoreConf.getVar(hconf, MetastoreConf.ConfVars.WAREHOUSE));
-    try {
-      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
-    } catch (IOException e) {
-
-    }
     Path warehousePathReplica = new Path(MetastoreConf.getVar(hconfMirror, MetastoreConf.ConfVars.WAREHOUSE));
     try {
+      warehousePath.getFileSystem(hconf).delete(warehousePath, true);
       warehousePathReplica.getFileSystem(hconfMirror).delete(warehousePathReplica, true);
-    } catch (IOException e) {
+      Hive.getCurrHiveDb(null, null).close(true);
+    } catch (IOException | HiveException e) {
 

Review Comment:
   should we at least log the exception?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org