You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jd...@apache.org on 2012/10/10 06:07:58 UTC
svn commit: r1396463 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Author: jdcryans
Date: Wed Oct 10 04:07:58 2012
New Revision: 1396463
URL: http://svn.apache.org/viewvc?rev=1396463&view=rev
Log:
HBASE-6733 TestReplication.queueFailover occasionally fails [Part-2] (Devaraj Das via JD)
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java?rev=1396463&r1=1396462&r2=1396463&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java Wed Oct 10 04:07:58 2012
@@ -286,8 +286,15 @@ public class ReplicationSource extends T
}
continue;
}
+ Path oldPath = getCurrentPath(); //note that in the current scenario,
+ //oldPath will be null when a log roll
+ //happens.
// Get a new path
- if (!getNextPath()) {
+ boolean hasCurrentPath = getNextPath();
+ if (getCurrentPath() != null && oldPath == null) {
+ sleepMultiplier = 1; //reset the sleepMultiplier on a path change
+ }
+ if (!hasCurrentPath) {
if (sleepForRetries("No log to process", sleepMultiplier)) {
sleepMultiplier++;
}