Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 f0042a403 -> 2414fdc7a


HBASE-14146 Fix Once replication sees an error it slows down forever


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

Branch: refs/heads/branch-1.2
Commit: 2414fdc7a51f957ff1805062e4e141565865772a
Parents: f0042a4
Author: Elliott Clark <[email protected]>
Authored: Wed Jul 22 14:50:16 2015 -0700
Committer: Elliott Clark <[email protected]>
Committed: Thu Jul 23 16:12:22 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/replication/regionserver/ReplicationSource.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2414fdc7/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
index 3f23837..2126f6d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -659,7 +659,7 @@ public class ReplicationSource extends Thread
    * written to when this method was called
    */
   protected void shipEdits(boolean currentWALisBeingWrittenTo, List<WAL.Entry> 
entries) {
-    int sleepMultiplier = 1;
+    int sleepMultiplier = 0;
     if (entries.isEmpty()) {
       LOG.warn("Was given 0 edits to ship");
       return;
@@ -696,6 +696,8 @@ public class ReplicationSource extends Thread
 
         if (!replicated) {
           continue;
+        } else {
+          sleepMultiplier = Math.max(sleepMultiplier-1, 0);
         }
 
         if (this.lastLoggedPosition != this.repLogReader.getPosition()) {

Reply via email to