HBASE-20054 removes the indefinite retry introduced by HBASE-18282

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

Branch: refs/heads/HBASE-19397-branch-2
Commit: d6d1e49a7561ac1b13d965bf74436919de625f1d
Parents: 4ddfdaf
Author: tedyu <yuzhih...@gmail.com>
Authored: Fri Feb 23 19:14:04 2018 -0800
Committer: tedyu <yuzhih...@gmail.com>
Committed: Fri Feb 23 19:14:04 2018 -0800

----------------------------------------------------------------------
 .../regionserver/ReplicationSourceManager.java   | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d6d1e49a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
index 2cf3a82..bfd338d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
@@ -782,20 +782,11 @@ public class ReplicationSourceManager implements 
ReplicationListener {
     @Override
     public void run() {
       List<String> currentReplicators = null;
-      while (currentReplicators == null) {
-        try {
-          currentReplicators = replicationQueues.getListOfReplicators();
-        } catch (ReplicationException e1) {
-          LOG.warn("Failure in getListOfReplicators(), will retry later", e1);
-          try {
-            Thread.sleep(ThreadLocalRandom.current().nextInt(10000));
-          } catch (InterruptedException e2) {
-            LOG.warn("Interrupted while waiting for list of replicators to be 
available, "
-                + "will not adopt any abandoned queues", e2);
-            Thread.currentThread().interrupt();
-            break;
-          }
-        }
+      try {
+        currentReplicators = replicationQueues.getListOfReplicators();
+      } catch (ReplicationException e) {
+        server.abort("Failed to get all replicators", e);
+        return;
       }
       if (currentReplicators == null || currentReplicators.isEmpty()) {
         return;

Reply via email to