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

This commit is contained in:
Elliott Clark 2015-07-22 14:50:16 -07:00
parent 4ec69ccf3a
commit e087a9ef51
1 changed files with 3 additions and 1 deletions

View File

@ -659,7 +659,7 @@ public class ReplicationSource extends Thread
* written to when this method was called * written to when this method was called
*/ */
protected void shipEdits(boolean currentWALisBeingWrittenTo, List<WAL.Entry> entries) { protected void shipEdits(boolean currentWALisBeingWrittenTo, List<WAL.Entry> entries) {
int sleepMultiplier = 1; int sleepMultiplier = 0;
if (entries.isEmpty()) { if (entries.isEmpty()) {
LOG.warn("Was given 0 edits to ship"); LOG.warn("Was given 0 edits to ship");
return; return;
@ -696,6 +696,8 @@ public class ReplicationSource extends Thread
if (!replicated) { if (!replicated) {
continue; continue;
} else {
sleepMultiplier = Math.max(sleepMultiplier-1, 0);
} }
if (this.lastLoggedPosition != this.repLogReader.getPosition()) { if (this.lastLoggedPosition != this.repLogReader.getPosition()) {