Index: src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java (revision 1022733) +++ src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java (working copy) @@ -320,6 +320,8 @@ // wait a bit and retry. // But if we need to stop, don't bother sleeping if (!stopper.isStopped() && (gotIOE || currentNbEntries == 0)) { + this.manager.logPositionAndCleanOldLogs(this.currentPath, + this.peerClusterZnode, this.position, queueRecovered); if (sleepForRetries("Nothing to replicate", sleepMultiplier)) { sleepMultiplier++; } @@ -527,6 +529,10 @@ */ protected void shipEdits() { int sleepMultiplier = 1; + if (this.currentNbEntries == 0) { + LOG.warn("Was given 0 edits to ship"); + return; + } while (!this.stopper.isStopped()) { try { HRegionInterface rrs = getRS();