Repository: hbase
Updated Branches:
  refs/heads/master 8e8e1e5a1 -> 39e191e55


HBASE-19979 ReplicationSyncUp tool may leak Zookeeper connection


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/39e191e5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/39e191e5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/39e191e5

Branch: refs/heads/master
Commit: 39e191e5598529c68007c96e69acdd923a294d33
Parents: 8e8e1e5
Author: Pankaj Kumar <pankaj...@huawei.com>
Authored: Tue Feb 13 08:59:02 2018 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Tue Feb 13 08:59:02 2018 -0800

----------------------------------------------------------------------
 .../hbase/replication/regionserver/ReplicationSyncUp.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/39e191e5/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java
index 01a230d..283eb96 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSyncUp.java
@@ -111,14 +111,14 @@ public class ReplicationSyncUp extends Configured 
implements Tool {
       while (manager.getOldSources().size() > 0) {
         Thread.sleep(SLEEP_TIME);
       }
+      manager.join();
     } catch (InterruptedException e) {
       System.err.println("didn't wait long enough:" + e);
       return (-1);
+    } finally {
+      zkw.close();
     }
 
-    manager.join();
-    zkw.close();
-
     return 0;
   }
 

Reply via email to