Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 e6dda8ea6 -> 0507413fe


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/0507413f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0507413f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0507413f

Branch: refs/heads/branch-1.3
Commit: 0507413fe61d5a17229817e2d56d7603d037bde8
Parents: e6dda8e
Author: Pankaj Kumar <pankaj...@huawei.com>
Authored: Tue Feb 13 21:24:54 2018 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Tue Feb 13 21:24:54 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/0507413f/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 8d38b09..3d28c97 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
@@ -110,14 +110,14 @@ public class ReplicationSyncUp extends Configured 
implements Tool {
         Thread.sleep(SLEEP_TIME);
         numberOfOldSource = manager.getOldSources().size();
       }
+      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